diff --git a/src/FunctionLike.php b/src/FunctionLike.php index 73580bf0..5ef91b52 100644 --- a/src/FunctionLike.php +++ b/src/FunctionLike.php @@ -6,8 +6,12 @@ namespace Microsoft\PhpParser; +use Microsoft\PhpParser\Node\AttributeGroup; + /** * Interface for recognizing functions easily. * Each Node that implements this interface can be considered a function. + * + * @property AttributeGroup[] $attributes */ interface FunctionLike {} \ No newline at end of file diff --git a/src/Node/Attribute.php b/src/Node/Attribute.php new file mode 100644 index 00000000..2674414d --- /dev/null +++ b/src/Node/Attribute.php @@ -0,0 +1,31 @@ +parseDeclareStatement($parentNode); + // attribute before statement or anonymous function + case TokenKind::AttributeToken: + return $this->parseAttributeStatement($parentNode); + // function-declaration case TokenKind::FunctionKeyword: // Check that this is not an anonymous-function-creation-expression @@ -630,6 +637,9 @@ private function parseClassElementFn() { case TokenKind::UseKeyword: return $this->parseTraitUseClause($parentNode); + case TokenKind::AttributeToken: + return $this->parseAttributeStatement($parentNode); + default: return $this->parseRemainingPropertyDeclarationOrMissingMemberDeclaration($parentNode, $modifiers); } @@ -665,6 +675,116 @@ private function parseFunctionDeclaration($parentNode) { return $functionNode; } + /** + * @return Node + */ + private function parseAttributeExpression($parentNode) { + $attributeGroups = $this->parseAttributeGroups(null); + // Warn about invalid syntax for attributed declarations + // Lookahead for static, function, or fn for the only type of expressions that can have attributes (anonymous functions) + if (in_array($this->token->kind, [TokenKind::FunctionKeyword, TokenKind::FnKeyword], true) || + $this->token->kind === TokenKind::StaticKeyword && $this->lookahead([TokenKind::FunctionKeyword, TokenKind::FnKeyword])) { + $expression = $this->parsePrimaryExpression($parentNode); + } else { + // Create a MissingToken so that diagnostics indicate that the attributes did not match up with an expression/declaration. + $expression = new MissingDeclaration(); + $expression->parent = $parentNode; + $expression->declaration = new MissingToken(TokenKind::Expression, $this->token->fullStart); + } + if ($expression instanceof AnonymousFunctionCreationExpression || + $expression instanceof ArrowFunctionCreationExpression || + $expression instanceof MissingDeclaration) { + $expression->attributes = $attributeGroups; + foreach ($attributeGroups as $attributeGroup) { + $attributeGroup->parent = $expression; + } + } + return $expression; + } + + /** + * Precondition: The next token is an AttributeToken + * @return Node + */ + private function parseAttributeStatement($parentNode) { + $attributeGroups = $this->parseAttributeGroups(null); + if ($parentNode instanceof ClassMembersNode) { + // Create a class element or a MissingMemberDeclaration + $statement = $this->parseClassElementFn()($parentNode); + } else { + // Classlikes, anonymous functions, global functions, and arrow functions can have attributes. Global constants cannot. + if (in_array($this->token->kind, [TokenKind::ClassKeyword, TokenKind::TraitKeyword, TokenKind::InterfaceKeyword, TokenKind::AbstractKeyword, TokenKind::FinalKeyword, TokenKind::FunctionKeyword, TokenKind::FnKeyword], true) || + $this->token->kind === TokenKind::StaticKeyword && $this->lookahead([TokenKind::FunctionKeyword, TokenKind::FnKeyword])) { + $statement = $this->parseStatement($parentNode); + } else { + // Create a MissingToken so that diagnostics indicate that the attributes did not match up with an expression/declaration. + $statement = new MissingDeclaration(); + $statement->parent = $parentNode; + $statement->declaration = new MissingToken(TokenKind::Expression, $this->token->fullStart); + } + } + + if ($statement instanceof FunctionLike || + $statement instanceof ClassDeclaration || + $statement instanceof ClassConstDeclaration || + $statement instanceof PropertyDeclaration || + $statement instanceof MissingDeclaration || + $statement instanceof MissingMemberDeclaration) { + + $statement->attributes = $attributeGroups; + foreach ($attributeGroups as $attributeGroup) { + $attributeGroup->parent = $statement; + } + } + return $statement; + } + + /** + * @param Node|null $parentNode + * @return AttributeGroup[] + */ + private function parseAttributeGroups($parentNode): array + { + $attributeGroups = []; + while ($attributeToken = $this->eatOptional1(TokenKind::AttributeToken)) { + $attributeGroup = new AttributeGroup(); + $attributeGroup->startToken = $attributeToken; + $attributeGroup->attributes = $this->parseAttributeElementList($attributeGroup); + $attributeGroup->endToken = $this->eat1(TokenKind::CloseBracketToken); + $attributeGroup->parent = $parentNode; + $attributeGroups[] = $attributeGroup; + } + return $attributeGroups; + } + + /** + * @return DelimitedList\AttributeElementList + */ + private function parseAttributeElementList(AttributeGroup $parentNode) { + return $this->parseDelimitedList( + DelimitedList\AttributeElementList::class, + TokenKind::CommaToken, + $this->isQualifiedNameStartFn(), + $this->parseAttributeFn(), + $parentNode, + false); + } + + private function parseAttributeFn() + { + return function ($parentNode): Attribute { + $attribute = new Attribute(); + $attribute->parent = $parentNode; + $attribute->name = $this->parseQualifiedName($attribute); + $attribute->openParen = $this->eatOptional1(TokenKind::OpenParenToken); + if ($attribute->openParen) { + $attribute->argumentExpressionList = $this->parseArgumentExpressionList($attribute); + $attribute->closeParen = $this->eat1(TokenKind::CloseParenToken); + } + return $attribute; + }; + } + private function parseMethodDeclaration($parentNode, $modifiers) { $methodDeclaration = new MethodDeclaration(); $methodDeclaration->modifiers = $modifiers; @@ -677,6 +797,9 @@ private function parseParameterFn() { return function ($parentNode) { $parameter = new Parameter(); $parameter->parent = $parentNode; + if ($this->token->kind === TokenKind::AttributeToken) { + $parameter->attributes = $this->parseAttributeGroups($parameter); + } $parameter->visibilityToken = $this->eatOptional([TokenKind::PublicKeyword, TokenKind::ProtectedKeyword, TokenKind::PrivateKeyword]); $parameter->questionToken = $this->eatOptional1(TokenKind::QuestionToken); $typeDeclarationList = $this->tryParseParameterTypeDeclarationList($parameter); @@ -817,6 +940,9 @@ private function isClassMemberDeclarationStart(Token $token) { case TokenKind::FunctionKeyword: case TokenKind::UseKeyword: + + // attributes + case TokenKind::AttributeToken: return true; } @@ -889,6 +1015,9 @@ private function isStatementStart(Token $token) { case TokenKind::StaticKeyword: case TokenKind::ScriptSectionEndTag: + + // attributes + case TokenKind::AttributeToken: return true; default: @@ -996,6 +1125,7 @@ private function isExpressionStartFn() { case TokenKind::StaticKeyword: case TokenKind::FunctionKeyword: case TokenKind::FnKeyword: + case TokenKind::AttributeToken: return true; } return \in_array($token->kind, $this->reservedWordTokens, true); @@ -1090,6 +1220,9 @@ private function parsePrimaryExpression($parentNode) { return $this->parseParenthesizedExpression($parentNode); // anonymous-function-creation-expression + case TokenKind::AttributeToken: + return $this->parseAttributeExpression($parentNode); + case TokenKind::StaticKeyword: // handle `static::`, `static(`, `new static;`, `instanceof static` if (!$this->lookahead([TokenKind::FunctionKeyword, TokenKind::FnKeyword])) { @@ -1327,6 +1460,7 @@ private function isParameterStartFn() { case TokenKind::PublicKeyword: case TokenKind::ProtectedKeyword: case TokenKind::PrivateKeyword: + case TokenKind::AttributeToken: return true; } @@ -3158,6 +3292,8 @@ private function isInterfaceMemberDeclarationStart(Token $token) { case TokenKind::ConstKeyword: case TokenKind::FunctionKeyword: + + case TokenKind::AttributeToken: return true; } return false; @@ -3326,6 +3462,9 @@ private function isTraitMemberDeclarationStart($token) { // trait-use-clauses case TokenKind::UseKeyword: + + // attributes + case TokenKind::AttributeToken: return true; } return false; diff --git a/src/PhpTokenizer.php b/src/PhpTokenizer.php index 10c2df8a..5c2b19ac 100644 --- a/src/PhpTokenizer.php +++ b/src/PhpTokenizer.php @@ -13,6 +13,7 @@ // If this predates PHP 8.0, T_MATCH is unavailable. The replacement value is arbitrary - it just has to be different from other values of token constants. define(__NAMESPACE__ . '\T_MATCH', defined('T_MATCH') ? constant('T_MATCH') : 'T_MATCH'); define(__NAMESPACE__ . '\T_NULLSAFE_OBJECT_OPERATOR', defined('T_NULLSAFE_OBJECT_OPERATOR') ? constant('T_NULLSAFE_OBJECT_OPERATOR') : 'T_MATCH'); +define(__NAMESPACE__ . '\T_ATTRIBUTE', defined('T_ATTRIBUTE') ? constant('T_ATTRIBUTE') : 'T_ATTRIBUTE'); /** * Tokenizes content using PHP's built-in `token_get_all`, and converts to "lightweight" Token representation. @@ -309,6 +310,7 @@ protected static function tokenGetAll(string $content, $parseContext): array "." => TokenKind::DotToken, T_OBJECT_OPERATOR => TokenKind::ArrowToken, T_NULLSAFE_OBJECT_OPERATOR => TokenKind::QuestionArrowToken, + T_ATTRIBUTE => TokenKind::AttributeToken, T_INC => TokenKind::PlusPlusToken, T_DEC => TokenKind::MinusMinusToken, T_POW => TokenKind::AsteriskAsteriskToken, diff --git a/src/TokenKind.php b/src/TokenKind.php index 26bb9d84..bd97a0ee 100644 --- a/src/TokenKind.php +++ b/src/TokenKind.php @@ -150,6 +150,7 @@ class TokenKind { const QuestionToken = 261; const QuestionQuestionEqualsToken = 262; const QuestionArrowToken = 263; + const AttributeToken = 264; const DecimalLiteralToken = 301; const OctalLiteralToken = 302; diff --git a/tests/cases/parser/abstractMethodDeclaration1.php.tree b/tests/cases/parser/abstractMethodDeclaration1.php.tree index 3eebbd78..1a03253c 100644 --- a/tests/cases/parser/abstractMethodDeclaration1.php.tree +++ b/tests/cases/parser/abstractMethodDeclaration1.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": { "kind": "AbstractKeyword", "textLength": 8 @@ -36,6 +37,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/abstractMethodDeclaration2.php.tree b/tests/cases/parser/abstractMethodDeclaration2.php.tree index 242cdd66..42f78cdd 100644 --- a/tests/cases/parser/abstractMethodDeclaration2.php.tree +++ b/tests/cases/parser/abstractMethodDeclaration2.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/abstractMethodDeclaration3.php.tree b/tests/cases/parser/abstractMethodDeclaration3.php.tree index 83b6e1ff..4e988a77 100644 --- a/tests/cases/parser/abstractMethodDeclaration3.php.tree +++ b/tests/cases/parser/abstractMethodDeclaration3.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": { "kind": "AbstractKeyword", "textLength": 8 @@ -36,6 +37,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/abstractMethodDeclaration4.php.tree b/tests/cases/parser/abstractMethodDeclaration4.php.tree index dde4e200..ad401f6f 100644 --- a/tests/cases/parser/abstractMethodDeclaration4.php.tree +++ b/tests/cases/parser/abstractMethodDeclaration4.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/abstractMethodDeclaration5.php.tree b/tests/cases/parser/abstractMethodDeclaration5.php.tree index 1d4bad25..651b6ab7 100644 --- a/tests/cases/parser/abstractMethodDeclaration5.php.tree +++ b/tests/cases/parser/abstractMethodDeclaration5.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": { "kind": "AbstractKeyword", "textLength": 8 @@ -36,6 +37,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "AbstractKeyword", diff --git a/tests/cases/parser/abstractMethodDeclaration6.php.tree b/tests/cases/parser/abstractMethodDeclaration6.php.tree index 48fd2c08..ea1a6962 100644 --- a/tests/cases/parser/abstractMethodDeclaration6.php.tree +++ b/tests/cases/parser/abstractMethodDeclaration6.php.tree @@ -18,6 +18,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": { "kind": "AbstractKeyword", "textLength": 8 @@ -41,6 +42,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "AbstractKeyword", diff --git a/tests/cases/parser/abstractMethodDeclaration7.php.tree b/tests/cases/parser/abstractMethodDeclaration7.php.tree index 9f091bf0..3f8d4186 100644 --- a/tests/cases/parser/abstractMethodDeclaration7.php.tree +++ b/tests/cases/parser/abstractMethodDeclaration7.php.tree @@ -18,6 +18,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": { "kind": "FinalKeyword", "textLength": 5 @@ -41,6 +42,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [], "functionKeyword": { "kind": "FunctionKeyword", diff --git a/tests/cases/parser/anonymousFunctionCreationExpression1.php.tree b/tests/cases/parser/anonymousFunctionCreationExpression1.php.tree index fb1d08ec..aa2fea01 100644 --- a/tests/cases/parser/anonymousFunctionCreationExpression1.php.tree +++ b/tests/cases/parser/anonymousFunctionCreationExpression1.php.tree @@ -15,6 +15,7 @@ "ExpressionStatement": { "expression": { "AnonymousFunctionCreationExpression": { + "attributes": null, "staticModifier": { "kind": "StaticKeyword", "textLength": 6 diff --git a/tests/cases/parser/anonymousFunctionCreationExpression10.php.tree b/tests/cases/parser/anonymousFunctionCreationExpression10.php.tree index 6164da18..126a2a88 100644 --- a/tests/cases/parser/anonymousFunctionCreationExpression10.php.tree +++ b/tests/cases/parser/anonymousFunctionCreationExpression10.php.tree @@ -31,6 +31,7 @@ "byRef": null, "rightOperand": { "AnonymousFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FunctionKeyword", diff --git a/tests/cases/parser/anonymousFunctionCreationExpression11.php.tree b/tests/cases/parser/anonymousFunctionCreationExpression11.php.tree index 2a3c62ce..08021e1b 100644 --- a/tests/cases/parser/anonymousFunctionCreationExpression11.php.tree +++ b/tests/cases/parser/anonymousFunctionCreationExpression11.php.tree @@ -15,6 +15,7 @@ "ExpressionStatement": { "expression": { "AnonymousFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FunctionKeyword", diff --git a/tests/cases/parser/anonymousFunctionCreationExpression2.php.tree b/tests/cases/parser/anonymousFunctionCreationExpression2.php.tree index 2d092800..e69b922f 100644 --- a/tests/cases/parser/anonymousFunctionCreationExpression2.php.tree +++ b/tests/cases/parser/anonymousFunctionCreationExpression2.php.tree @@ -15,6 +15,7 @@ "ExpressionStatement": { "expression": { "AnonymousFunctionCreationExpression": { + "attributes": null, "staticModifier": { "kind": "StaticKeyword", "textLength": 6 diff --git a/tests/cases/parser/anonymousFunctionCreationExpression3.php.tree b/tests/cases/parser/anonymousFunctionCreationExpression3.php.tree index 04c3b828..c67ae972 100644 --- a/tests/cases/parser/anonymousFunctionCreationExpression3.php.tree +++ b/tests/cases/parser/anonymousFunctionCreationExpression3.php.tree @@ -15,6 +15,7 @@ "ExpressionStatement": { "expression": { "AnonymousFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FunctionKeyword", diff --git a/tests/cases/parser/anonymousFunctionCreationExpression4.php.tree b/tests/cases/parser/anonymousFunctionCreationExpression4.php.tree index 5ed4f174..24f67a7b 100644 --- a/tests/cases/parser/anonymousFunctionCreationExpression4.php.tree +++ b/tests/cases/parser/anonymousFunctionCreationExpression4.php.tree @@ -15,6 +15,7 @@ "ExpressionStatement": { "expression": { "AnonymousFunctionCreationExpression": { + "attributes": null, "staticModifier": { "kind": "StaticKeyword", "textLength": 6 diff --git a/tests/cases/parser/anonymousFunctionCreationExpression5.php.tree b/tests/cases/parser/anonymousFunctionCreationExpression5.php.tree index fa8532cb..e08e3c56 100644 --- a/tests/cases/parser/anonymousFunctionCreationExpression5.php.tree +++ b/tests/cases/parser/anonymousFunctionCreationExpression5.php.tree @@ -31,6 +31,7 @@ "byRef": null, "rightOperand": { "AnonymousFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FunctionKeyword", diff --git a/tests/cases/parser/anonymousFunctionCreationExpression6.php.tree b/tests/cases/parser/anonymousFunctionCreationExpression6.php.tree index 138f05c3..6dd40366 100644 --- a/tests/cases/parser/anonymousFunctionCreationExpression6.php.tree +++ b/tests/cases/parser/anonymousFunctionCreationExpression6.php.tree @@ -31,6 +31,7 @@ "byRef": null, "rightOperand": { "AnonymousFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FunctionKeyword", diff --git a/tests/cases/parser/anonymousFunctionCreationExpression7.php.tree b/tests/cases/parser/anonymousFunctionCreationExpression7.php.tree index 2d5fa527..136ee3e9 100644 --- a/tests/cases/parser/anonymousFunctionCreationExpression7.php.tree +++ b/tests/cases/parser/anonymousFunctionCreationExpression7.php.tree @@ -31,6 +31,7 @@ "byRef": null, "rightOperand": { "AnonymousFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FunctionKeyword", diff --git a/tests/cases/parser/classBaseClause1.php.tree b/tests/cases/parser/classBaseClause1.php.tree index ff1b0cc2..17ac7a55 100644 --- a/tests/cases/parser/classBaseClause1.php.tree +++ b/tests/cases/parser/classBaseClause1.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/classBaseClause2.php.tree b/tests/cases/parser/classBaseClause2.php.tree index 415f5260..4c08157c 100644 --- a/tests/cases/parser/classBaseClause2.php.tree +++ b/tests/cases/parser/classBaseClause2.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/classBaseClause6.php.tree b/tests/cases/parser/classBaseClause6.php.tree index 3f137d49..d10495a8 100644 --- a/tests/cases/parser/classBaseClause6.php.tree +++ b/tests/cases/parser/classBaseClause6.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/classConstDeclaration1.php.tree b/tests/cases/parser/classConstDeclaration1.php.tree index 0a96ba84..0a8fa92b 100644 --- a/tests/cases/parser/classConstDeclaration1.php.tree +++ b/tests/cases/parser/classConstDeclaration1.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "ClassConstDeclaration": { + "attributes": null, "modifiers": [], "constKeyword": { "kind": "ConstKeyword", diff --git a/tests/cases/parser/classConstDeclaration10.php.tree b/tests/cases/parser/classConstDeclaration10.php.tree index a545cd97..00bdabf1 100644 --- a/tests/cases/parser/classConstDeclaration10.php.tree +++ b/tests/cases/parser/classConstDeclaration10.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "ClassConstDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/classConstDeclaration2.php.tree b/tests/cases/parser/classConstDeclaration2.php.tree index 95bbf816..7d67c9ff 100644 --- a/tests/cases/parser/classConstDeclaration2.php.tree +++ b/tests/cases/parser/classConstDeclaration2.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "ClassConstDeclaration": { + "attributes": null, "modifiers": [], "constKeyword": { "kind": "ConstKeyword", diff --git a/tests/cases/parser/classConstDeclaration4.php.tree b/tests/cases/parser/classConstDeclaration4.php.tree index adb76650..7d86afc1 100644 --- a/tests/cases/parser/classConstDeclaration4.php.tree +++ b/tests/cases/parser/classConstDeclaration4.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "ClassConstDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/classConstDeclaration5.php.tree b/tests/cases/parser/classConstDeclaration5.php.tree index 082096f5..005f6a55 100644 --- a/tests/cases/parser/classConstDeclaration5.php.tree +++ b/tests/cases/parser/classConstDeclaration5.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "ClassConstDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/classConstDeclaration7.php.tree b/tests/cases/parser/classConstDeclaration7.php.tree index 0b94be01..ab55bdee 100644 --- a/tests/cases/parser/classConstDeclaration7.php.tree +++ b/tests/cases/parser/classConstDeclaration7.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "ClassConstDeclaration": { + "attributes": null, "modifiers": [], "constKeyword": { "kind": "ConstKeyword", diff --git a/tests/cases/parser/classConstDeclaration8.php.tree b/tests/cases/parser/classConstDeclaration8.php.tree index 1d6c30de..7af1fe06 100644 --- a/tests/cases/parser/classConstDeclaration8.php.tree +++ b/tests/cases/parser/classConstDeclaration8.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "ClassConstDeclaration": { + "attributes": null, "modifiers": [], "constKeyword": { "kind": "ConstKeyword", diff --git a/tests/cases/parser/classConstDeclaration9.php.tree b/tests/cases/parser/classConstDeclaration9.php.tree index b3820798..13e66b04 100644 --- a/tests/cases/parser/classConstDeclaration9.php.tree +++ b/tests/cases/parser/classConstDeclaration9.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "ClassConstDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/classInterfaceClause1.php.tree b/tests/cases/parser/classInterfaceClause1.php.tree index 1452c272..73a01131 100644 --- a/tests/cases/parser/classInterfaceClause1.php.tree +++ b/tests/cases/parser/classInterfaceClause1.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/classInterfaceClause2.php.tree b/tests/cases/parser/classInterfaceClause2.php.tree index e564e2be..429f8e55 100644 --- a/tests/cases/parser/classInterfaceClause2.php.tree +++ b/tests/cases/parser/classInterfaceClause2.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/classInterfaceClause3.php.tree b/tests/cases/parser/classInterfaceClause3.php.tree index e832a47f..b0ccfe59 100644 --- a/tests/cases/parser/classInterfaceClause3.php.tree +++ b/tests/cases/parser/classInterfaceClause3.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/classInterfaceClause4.php.tree b/tests/cases/parser/classInterfaceClause4.php.tree index 57a9fc3f..de6a83a6 100644 --- a/tests/cases/parser/classInterfaceClause4.php.tree +++ b/tests/cases/parser/classInterfaceClause4.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/classInterfaceClause5.php.tree b/tests/cases/parser/classInterfaceClause5.php.tree index 69964f45..d88246aa 100644 --- a/tests/cases/parser/classInterfaceClause5.php.tree +++ b/tests/cases/parser/classInterfaceClause5.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/classInterfaceClause6.php.tree b/tests/cases/parser/classInterfaceClause6.php.tree index 1d6a14b7..18f39151 100644 --- a/tests/cases/parser/classInterfaceClause6.php.tree +++ b/tests/cases/parser/classInterfaceClause6.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/classMethods1.php.tree b/tests/cases/parser/classMethods1.php.tree index 9e03b185..6b52f67c 100644 --- a/tests/cases/parser/classMethods1.php.tree +++ b/tests/cases/parser/classMethods1.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/classMethods3.php.tree b/tests/cases/parser/classMethods3.php.tree index b0ad87a4..cdb850fe 100644 --- a/tests/cases/parser/classMethods3.php.tree +++ b/tests/cases/parser/classMethods3.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -57,6 +59,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -77,6 +80,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/classMethods4.php.tree b/tests/cases/parser/classMethods4.php.tree index 76112f9f..606f19d4 100644 --- a/tests/cases/parser/classMethods4.php.tree +++ b/tests/cases/parser/classMethods4.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -57,6 +59,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -77,6 +80,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/classMethods5.php.tree b/tests/cases/parser/classMethods5.php.tree index 5a85c917..fa756e61 100644 --- a/tests/cases/parser/classMethods5.php.tree +++ b/tests/cases/parser/classMethods5.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -79,6 +81,7 @@ }, { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/constructorDeclaration1.php.tree b/tests/cases/parser/constructorDeclaration1.php.tree index b51d625d..f261d4e0 100644 --- a/tests/cases/parser/constructorDeclaration1.php.tree +++ b/tests/cases/parser/constructorDeclaration1.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/functions1.php.tree b/tests/cases/parser/functions1.php.tree index 6ef69ee3..731f0b6b 100644 --- a/tests/cases/parser/functions1.php.tree +++ b/tests/cases/parser/functions1.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/functions10.php.tree b/tests/cases/parser/functions10.php.tree index 1ac8a00e..1ddb0d1c 100644 --- a/tests/cases/parser/functions10.php.tree +++ b/tests/cases/parser/functions10.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -51,6 +53,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/functions11.php.tree b/tests/cases/parser/functions11.php.tree index 6b3755ac..4e869ae9 100644 --- a/tests/cases/parser/functions11.php.tree +++ b/tests/cases/parser/functions11.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -51,6 +53,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { diff --git a/tests/cases/parser/functions12.php.tree b/tests/cases/parser/functions12.php.tree index bef18329..7614cd96 100644 --- a/tests/cases/parser/functions12.php.tree +++ b/tests/cases/parser/functions12.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -51,6 +53,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { diff --git a/tests/cases/parser/functions13.php.tree b/tests/cases/parser/functions13.php.tree index b6487428..0972bc87 100644 --- a/tests/cases/parser/functions13.php.tree +++ b/tests/cases/parser/functions13.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -51,6 +53,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { diff --git a/tests/cases/parser/functions14.php.tree b/tests/cases/parser/functions14.php.tree index aa02bae4..4a001fb5 100644 --- a/tests/cases/parser/functions14.php.tree +++ b/tests/cases/parser/functions14.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -51,6 +53,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { @@ -85,6 +88,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/functions15.php.tree b/tests/cases/parser/functions15.php.tree index d5fffc8a..894190b2 100644 --- a/tests/cases/parser/functions15.php.tree +++ b/tests/cases/parser/functions15.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -51,6 +53,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { @@ -85,6 +88,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/functions16.php.tree b/tests/cases/parser/functions16.php.tree index 2cdeff84..cccdcd94 100644 --- a/tests/cases/parser/functions16.php.tree +++ b/tests/cases/parser/functions16.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/functions17.php.tree b/tests/cases/parser/functions17.php.tree index 4afd0c68..16c330c0 100644 --- a/tests/cases/parser/functions17.php.tree +++ b/tests/cases/parser/functions17.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": { "kind": "QuestionToken", @@ -65,6 +67,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": { "kind": "QuestionToken", diff --git a/tests/cases/parser/functions18.php.tree b/tests/cases/parser/functions18.php.tree index 95e6e986..779aabf8 100644 --- a/tests/cases/parser/functions18.php.tree +++ b/tests/cases/parser/functions18.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { @@ -62,6 +64,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { diff --git a/tests/cases/parser/functions2.php.tree b/tests/cases/parser/functions2.php.tree index 801d8537..7328478b 100644 --- a/tests/cases/parser/functions2.php.tree +++ b/tests/cases/parser/functions2.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/functions3.php.tree b/tests/cases/parser/functions3.php.tree index 2541c163..734360a9 100644 --- a/tests/cases/parser/functions3.php.tree +++ b/tests/cases/parser/functions3.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { @@ -62,6 +64,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { diff --git a/tests/cases/parser/functions4.php.tree b/tests/cases/parser/functions4.php.tree index ed72e5f8..5b9eefd3 100644 --- a/tests/cases/parser/functions4.php.tree +++ b/tests/cases/parser/functions4.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/functions5.php.tree b/tests/cases/parser/functions5.php.tree index bb32462b..3ede5a6a 100644 --- a/tests/cases/parser/functions5.php.tree +++ b/tests/cases/parser/functions5.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/functions6.php.tree b/tests/cases/parser/functions6.php.tree index 976d76f1..206d89d1 100644 --- a/tests/cases/parser/functions6.php.tree +++ b/tests/cases/parser/functions6.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -62,6 +64,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/functions7.php.tree b/tests/cases/parser/functions7.php.tree index 7f59d69d..f7243a8c 100644 --- a/tests/cases/parser/functions7.php.tree +++ b/tests/cases/parser/functions7.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -58,6 +60,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/functions8.php.tree b/tests/cases/parser/functions8.php.tree index 6fa1eeef..cf34c0c3 100644 --- a/tests/cases/parser/functions8.php.tree +++ b/tests/cases/parser/functions8.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -51,6 +53,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/functions9.php.tree b/tests/cases/parser/functions9.php.tree index 379c5b45..d47d275c 100644 --- a/tests/cases/parser/functions9.php.tree +++ b/tests/cases/parser/functions9.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -51,6 +53,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/interfaceDeclaration10.php.tree b/tests/cases/parser/interfaceDeclaration10.php.tree index 3029cf90..f874ef4a 100644 --- a/tests/cases/parser/interfaceDeclaration10.php.tree +++ b/tests/cases/parser/interfaceDeclaration10.php.tree @@ -31,6 +31,7 @@ "interfaceMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -55,6 +56,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -75,6 +77,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/interfaceDeclaration11.php.tree b/tests/cases/parser/interfaceDeclaration11.php.tree index 3b9ef8e4..490688eb 100644 --- a/tests/cases/parser/interfaceDeclaration11.php.tree +++ b/tests/cases/parser/interfaceDeclaration11.php.tree @@ -31,6 +31,7 @@ "interfaceMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -67,6 +68,7 @@ }, { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/interfaceDeclaration12.php.tree b/tests/cases/parser/interfaceDeclaration12.php.tree index b961932e..9b3df05d 100644 --- a/tests/cases/parser/interfaceDeclaration12.php.tree +++ b/tests/cases/parser/interfaceDeclaration12.php.tree @@ -31,6 +31,7 @@ "interfaceMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -78,6 +79,7 @@ }, { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/interfaceDeclaration13.php.tree b/tests/cases/parser/interfaceDeclaration13.php.tree index 1261e263..4626be5a 100644 --- a/tests/cases/parser/interfaceDeclaration13.php.tree +++ b/tests/cases/parser/interfaceDeclaration13.php.tree @@ -31,6 +31,7 @@ "interfaceMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/interfaceDeclaration14.php.tree b/tests/cases/parser/interfaceDeclaration14.php.tree index f2beaaf8..60fb48ff 100644 --- a/tests/cases/parser/interfaceDeclaration14.php.tree +++ b/tests/cases/parser/interfaceDeclaration14.php.tree @@ -31,6 +31,7 @@ "interfaceMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/interfaceDeclaration15.php.tree b/tests/cases/parser/interfaceDeclaration15.php.tree index 39e434f7..8d1ac378 100644 --- a/tests/cases/parser/interfaceDeclaration15.php.tree +++ b/tests/cases/parser/interfaceDeclaration15.php.tree @@ -31,6 +31,7 @@ "interfaceMemberDeclarations": [ { "ClassConstDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/interfaceDeclaration16.php.tree b/tests/cases/parser/interfaceDeclaration16.php.tree index 7e8ec9a7..09c94bdb 100644 --- a/tests/cases/parser/interfaceDeclaration16.php.tree +++ b/tests/cases/parser/interfaceDeclaration16.php.tree @@ -31,6 +31,7 @@ "interfaceMemberDeclarations": [ { "ClassConstDeclaration": { + "attributes": null, "modifiers": [], "constKeyword": { "kind": "ConstKeyword", diff --git a/tests/cases/parser/interfaceDeclaration7.php.tree b/tests/cases/parser/interfaceDeclaration7.php.tree index 9a10526e..6b9ad3cc 100644 --- a/tests/cases/parser/interfaceDeclaration7.php.tree +++ b/tests/cases/parser/interfaceDeclaration7.php.tree @@ -31,6 +31,7 @@ "interfaceMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/interfaceDeclaration8.php.tree b/tests/cases/parser/interfaceDeclaration8.php.tree index ac7005aa..c7371d0d 100644 --- a/tests/cases/parser/interfaceDeclaration8.php.tree +++ b/tests/cases/parser/interfaceDeclaration8.php.tree @@ -31,6 +31,7 @@ "interfaceMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -55,6 +56,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -75,6 +77,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/interfaceDeclaration9.php.tree b/tests/cases/parser/interfaceDeclaration9.php.tree index 54990b7d..fa9b2b50 100644 --- a/tests/cases/parser/interfaceDeclaration9.php.tree +++ b/tests/cases/parser/interfaceDeclaration9.php.tree @@ -31,6 +31,7 @@ "interfaceMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -55,6 +56,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -75,6 +77,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/listExpression9.php.tree b/tests/cases/parser/listExpression9.php.tree index b9e2883e..d7f561df 100644 --- a/tests/cases/parser/listExpression9.php.tree +++ b/tests/cases/parser/listExpression9.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/namespaceDefinition3.php.tree b/tests/cases/parser/namespaceDefinition3.php.tree index 7a41a22f..4c13a917 100644 --- a/tests/cases/parser/namespaceDefinition3.php.tree +++ b/tests/cases/parser/namespaceDefinition3.php.tree @@ -46,6 +46,7 @@ "statements": [ { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/namespaces2.php.tree b/tests/cases/parser/namespaces2.php.tree index 6ec18f4f..72a1428a 100644 --- a/tests/cases/parser/namespaces2.php.tree +++ b/tests/cases/parser/namespaces2.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [], "functionKeyword": { "kind": "FunctionKeyword", diff --git a/tests/cases/parser/namespaces3.php.tree b/tests/cases/parser/namespaces3.php.tree index 5a904f21..d3a3320b 100644 --- a/tests/cases/parser/namespaces3.php.tree +++ b/tests/cases/parser/namespaces3.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [], "functionKeyword": { "kind": "FunctionKeyword", diff --git a/tests/cases/parser/namespaces4.php.tree b/tests/cases/parser/namespaces4.php.tree index 8b9f6baa..eea8e872 100644 --- a/tests/cases/parser/namespaces4.php.tree +++ b/tests/cases/parser/namespaces4.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [], "functionKeyword": { "kind": "FunctionKeyword", diff --git a/tests/cases/parser/namespaces5.php.tree b/tests/cases/parser/namespaces5.php.tree index f89c4c12..03a1c914 100644 --- a/tests/cases/parser/namespaces5.php.tree +++ b/tests/cases/parser/namespaces5.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [], "functionKeyword": { "kind": "FunctionKeyword", diff --git a/tests/cases/parser/objectCreationExpression7.php.tree b/tests/cases/parser/objectCreationExpression7.php.tree index cf7a788a..64bd69e7 100644 --- a/tests/cases/parser/objectCreationExpression7.php.tree +++ b/tests/cases/parser/objectCreationExpression7.php.tree @@ -43,6 +43,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/objectCreationExpression8.php.tree b/tests/cases/parser/objectCreationExpression8.php.tree index 97f2bb1e..9985edc3 100644 --- a/tests/cases/parser/objectCreationExpression8.php.tree +++ b/tests/cases/parser/objectCreationExpression8.php.tree @@ -84,6 +84,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/parameterPromotion1.php.tree b/tests/cases/parser/parameterPromotion1.php.tree index cdeb87ab..57cf8472 100644 --- a/tests/cases/parser/parameterPromotion1.php.tree +++ b/tests/cases/parser/parameterPromotion1.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -57,6 +59,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": { "kind": "PublicKeyword", "textLength": 6 @@ -80,6 +83,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": { "kind": "ProtectedKeyword", "textLength": 9 @@ -106,6 +110,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": { "kind": "PrivateKeyword", "textLength": 7 diff --git a/tests/cases/parser/parameterPromotion2.php.tree b/tests/cases/parser/parameterPromotion2.php.tree index ecd11a2f..ea26f720 100644 --- a/tests/cases/parser/parameterPromotion2.php.tree +++ b/tests/cases/parser/parameterPromotion2.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -57,6 +59,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": { "kind": "PublicKeyword", "textLength": 6 @@ -106,6 +109,7 @@ }, { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "ProtectedKeyword", diff --git a/tests/cases/parser/programStructure6.php.tree b/tests/cases/parser/programStructure6.php.tree index 14877497..77b337cb 100644 --- a/tests/cases/parser/programStructure6.php.tree +++ b/tests/cases/parser/programStructure6.php.tree @@ -78,6 +78,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/propertyDeclaration1.php.tree b/tests/cases/parser/propertyDeclaration1.php.tree index b3f93a8d..e0617dcc 100644 --- a/tests/cases/parser/propertyDeclaration1.php.tree +++ b/tests/cases/parser/propertyDeclaration1.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/propertyDeclaration2.php.tree b/tests/cases/parser/propertyDeclaration2.php.tree index ac861b70..8692e16e 100644 --- a/tests/cases/parser/propertyDeclaration2.php.tree +++ b/tests/cases/parser/propertyDeclaration2.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/propertyDeclaration3.php.tree b/tests/cases/parser/propertyDeclaration3.php.tree index 1ea68c8f..be68286f 100644 --- a/tests/cases/parser/propertyDeclaration3.php.tree +++ b/tests/cases/parser/propertyDeclaration3.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/propertyDeclaration4.php.tree b/tests/cases/parser/propertyDeclaration4.php.tree index 19cbf75e..368151af 100644 --- a/tests/cases/parser/propertyDeclaration4.php.tree +++ b/tests/cases/parser/propertyDeclaration4.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "StaticKeyword", diff --git a/tests/cases/parser/propertyDeclaration5.php.tree b/tests/cases/parser/propertyDeclaration5.php.tree index d52df3a6..c5ed863a 100644 --- a/tests/cases/parser/propertyDeclaration5.php.tree +++ b/tests/cases/parser/propertyDeclaration5.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "StaticKeyword", diff --git a/tests/cases/parser/scopedPropertyAccessExpression22.php.tree b/tests/cases/parser/scopedPropertyAccessExpression22.php.tree index d5badcf3..29693541 100644 --- a/tests/cases/parser/scopedPropertyAccessExpression22.php.tree +++ b/tests/cases/parser/scopedPropertyAccessExpression22.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/staticReturnType1.php.tree b/tests/cases/parser/staticReturnType1.php.tree index ead87421..b8fe1270 100644 --- a/tests/cases/parser/staticReturnType1.php.tree +++ b/tests/cases/parser/staticReturnType1.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/staticReturnType2.php.tree b/tests/cases/parser/staticReturnType2.php.tree index 971d7267..754c39c9 100644 --- a/tests/cases/parser/staticReturnType2.php.tree +++ b/tests/cases/parser/staticReturnType2.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/switchStatement6.php.tree b/tests/cases/parser/switchStatement6.php.tree index de07e9f5..2ec11552 100644 --- a/tests/cases/parser/switchStatement6.php.tree +++ b/tests/cases/parser/switchStatement6.php.tree @@ -54,6 +54,7 @@ "statementList": [ { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/traits18.php.tree b/tests/cases/parser/traits18.php.tree index 679a0187..b39c198a 100644 --- a/tests/cases/parser/traits18.php.tree +++ b/tests/cases/parser/traits18.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/traits21.php.tree b/tests/cases/parser/traits21.php.tree index 28945e82..45bdb8bf 100644 --- a/tests/cases/parser/traits21.php.tree +++ b/tests/cases/parser/traits21.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/traits22.php.tree b/tests/cases/parser/traits22.php.tree index a5df2da2..c9beb39f 100644 --- a/tests/cases/parser/traits22.php.tree +++ b/tests/cases/parser/traits22.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/traits24.php.tree b/tests/cases/parser/traits24.php.tree index 2d6aafa6..620a7779 100644 --- a/tests/cases/parser/traits24.php.tree +++ b/tests/cases/parser/traits24.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/traits25.php.tree b/tests/cases/parser/traits25.php.tree index 41648bfc..ad4b3d4d 100644 --- a/tests/cases/parser/traits25.php.tree +++ b/tests/cases/parser/traits25.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", diff --git a/tests/cases/parser/typedProperties.php.tree b/tests/cases/parser/typedProperties.php.tree index 25fcf5cd..de5e891f 100644 --- a/tests/cases/parser/typedProperties.php.tree +++ b/tests/cases/parser/typedProperties.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -92,6 +94,7 @@ }, { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PrivateKeyword", @@ -135,6 +138,7 @@ }, { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "ProtectedKeyword", @@ -193,6 +197,7 @@ }, { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/typedPropertiesInvalidElsewhere.php.tree b/tests/cases/parser/typedPropertiesInvalidElsewhere.php.tree index 9200b1d3..1918884c 100644 --- a/tests/cases/parser/typedPropertiesInvalidElsewhere.php.tree +++ b/tests/cases/parser/typedPropertiesInvalidElsewhere.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MissingMemberDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -49,6 +51,7 @@ }, { "MethodDeclaration": { + "attributes": null, "modifiers": [], "functionKeyword": { "kind": "FunctionKeyword", diff --git a/tests/cases/parser/typedPropertiesInvalidElsewhere2.php.tree b/tests/cases/parser/typedPropertiesInvalidElsewhere2.php.tree index 327b9a1a..3632399f 100644 --- a/tests/cases/parser/typedPropertiesInvalidElsewhere2.php.tree +++ b/tests/cases/parser/typedPropertiesInvalidElsewhere2.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MissingMemberDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -57,6 +59,7 @@ }, { "MethodDeclaration": { + "attributes": null, "modifiers": [], "functionKeyword": { "kind": "FunctionKeyword", diff --git a/tests/cases/parser/typedPropertiesNoType.php.tree b/tests/cases/parser/typedPropertiesNoType.php.tree index 5014c107..983c227b 100644 --- a/tests/cases/parser/typedPropertiesNoType.php.tree +++ b/tests/cases/parser/typedPropertiesNoType.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/typedPropertiesSimple.php.tree b/tests/cases/parser/typedPropertiesSimple.php.tree index 991ab613..121eccaf 100644 --- a/tests/cases/parser/typedPropertiesSimple.php.tree +++ b/tests/cases/parser/typedPropertiesSimple.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/unionTypeParameter1.php.tree b/tests/cases/parser/unionTypeParameter1.php.tree index 66c8a892..33c4f66e 100644 --- a/tests/cases/parser/unionTypeParameter1.php.tree +++ b/tests/cases/parser/unionTypeParameter1.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { diff --git a/tests/cases/parser/unionTypeParameter2.php.tree b/tests/cases/parser/unionTypeParameter2.php.tree index c01e7655..ad793ac0 100644 --- a/tests/cases/parser/unionTypeParameter2.php.tree +++ b/tests/cases/parser/unionTypeParameter2.php.tree @@ -15,6 +15,7 @@ "ExpressionStatement": { "expression": { "AnonymousFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FunctionKeyword", @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { diff --git a/tests/cases/parser/unionTypeParameter3.php.tree b/tests/cases/parser/unionTypeParameter3.php.tree index 39523e8f..a609d66b 100644 --- a/tests/cases/parser/unionTypeParameter3.php.tree +++ b/tests/cases/parser/unionTypeParameter3.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/unionTypeProperty.php.tree b/tests/cases/parser/unionTypeProperty.php.tree index ff94dbda..bb4cb424 100644 --- a/tests/cases/parser/unionTypeProperty.php.tree +++ b/tests/cases/parser/unionTypeProperty.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -89,6 +91,7 @@ }, { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PrivateKeyword", diff --git a/tests/cases/parser/unionTypeProperty2.php.tree b/tests/cases/parser/unionTypeProperty2.php.tree index 9e1f4d05..b436835d 100644 --- a/tests/cases/parser/unionTypeProperty2.php.tree +++ b/tests/cases/parser/unionTypeProperty2.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MissingMemberDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -62,6 +64,7 @@ }, { "MethodDeclaration": { + "attributes": null, "modifiers": [], "functionKeyword": { "kind": "FunctionKeyword", @@ -102,6 +105,7 @@ }, { "PropertyDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/unionTypeReturn1.php.tree b/tests/cases/parser/unionTypeReturn1.php.tree index 9283b3e9..82ca4c1f 100644 --- a/tests/cases/parser/unionTypeReturn1.php.tree +++ b/tests/cases/parser/unionTypeReturn1.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -92,6 +93,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/unionTypeReturn2.php.tree b/tests/cases/parser/unionTypeReturn2.php.tree index 19854302..4965e087 100644 --- a/tests/cases/parser/unionTypeReturn2.php.tree +++ b/tests/cases/parser/unionTypeReturn2.php.tree @@ -15,6 +15,7 @@ "ExpressionStatement": { "expression": { "AnonymousFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FunctionKeyword", @@ -101,6 +102,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -121,6 +123,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/whileStatement3.php.tree b/tests/cases/parser/whileStatement3.php.tree index 4a883027..3f52e4a5 100644 --- a/tests/cases/parser/whileStatement3.php.tree +++ b/tests/cases/parser/whileStatement3.php.tree @@ -13,6 +13,7 @@ }, { "ClassDeclaration": { + "attributes": null, "abstractOrFinalModifier": null, "classKeyword": { "kind": "ClassKeyword", @@ -33,6 +34,7 @@ "classMemberDeclarations": [ { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", @@ -153,6 +155,7 @@ }, { "MethodDeclaration": { + "attributes": null, "modifiers": [ { "kind": "PublicKeyword", diff --git a/tests/cases/parser/yieldExpression10.php.tree b/tests/cases/parser/yieldExpression10.php.tree index ab8f06e9..260f9788 100644 --- a/tests/cases/parser/yieldExpression10.php.tree +++ b/tests/cases/parser/yieldExpression10.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression10_from.php.tree b/tests/cases/parser/yieldExpression10_from.php.tree index e52bc643..16a634f3 100644 --- a/tests/cases/parser/yieldExpression10_from.php.tree +++ b/tests/cases/parser/yieldExpression10_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression11.php.tree b/tests/cases/parser/yieldExpression11.php.tree index 826a1b7c..e06bfc57 100644 --- a/tests/cases/parser/yieldExpression11.php.tree +++ b/tests/cases/parser/yieldExpression11.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression11_from.php.tree b/tests/cases/parser/yieldExpression11_from.php.tree index 37885bae..45c3b76e 100644 --- a/tests/cases/parser/yieldExpression11_from.php.tree +++ b/tests/cases/parser/yieldExpression11_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression12.php.tree b/tests/cases/parser/yieldExpression12.php.tree index 2c98dc4f..af1ba8d2 100644 --- a/tests/cases/parser/yieldExpression12.php.tree +++ b/tests/cases/parser/yieldExpression12.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression12_from.php.tree b/tests/cases/parser/yieldExpression12_from.php.tree index ae7e409d..ab3cee12 100644 --- a/tests/cases/parser/yieldExpression12_from.php.tree +++ b/tests/cases/parser/yieldExpression12_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression13.php.tree b/tests/cases/parser/yieldExpression13.php.tree index 633ebb8a..61deb876 100644 --- a/tests/cases/parser/yieldExpression13.php.tree +++ b/tests/cases/parser/yieldExpression13.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression13_from.php.tree b/tests/cases/parser/yieldExpression13_from.php.tree index 2993f9e0..7ef4a2eb 100644 --- a/tests/cases/parser/yieldExpression13_from.php.tree +++ b/tests/cases/parser/yieldExpression13_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression14.php.tree b/tests/cases/parser/yieldExpression14.php.tree index d7cd4cb2..53f3f3ff 100644 --- a/tests/cases/parser/yieldExpression14.php.tree +++ b/tests/cases/parser/yieldExpression14.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression14_from.php.tree b/tests/cases/parser/yieldExpression14_from.php.tree index 9ce7809b..8801d09b 100644 --- a/tests/cases/parser/yieldExpression14_from.php.tree +++ b/tests/cases/parser/yieldExpression14_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression15.php.tree b/tests/cases/parser/yieldExpression15.php.tree index e01ea8ef..72351d39 100644 --- a/tests/cases/parser/yieldExpression15.php.tree +++ b/tests/cases/parser/yieldExpression15.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression15_from.php.tree b/tests/cases/parser/yieldExpression15_from.php.tree index a5b47c08..b9367024 100644 --- a/tests/cases/parser/yieldExpression15_from.php.tree +++ b/tests/cases/parser/yieldExpression15_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression16.php.tree b/tests/cases/parser/yieldExpression16.php.tree index a97b80a2..98d37c22 100644 --- a/tests/cases/parser/yieldExpression16.php.tree +++ b/tests/cases/parser/yieldExpression16.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression16_from.php.tree b/tests/cases/parser/yieldExpression16_from.php.tree index a9bd7283..ded8ee3e 100644 --- a/tests/cases/parser/yieldExpression16_from.php.tree +++ b/tests/cases/parser/yieldExpression16_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression17.php.tree b/tests/cases/parser/yieldExpression17.php.tree index 6b5ead49..8a8768bb 100644 --- a/tests/cases/parser/yieldExpression17.php.tree +++ b/tests/cases/parser/yieldExpression17.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression17_from.php.tree b/tests/cases/parser/yieldExpression17_from.php.tree index ffc82758..342ad4b2 100644 --- a/tests/cases/parser/yieldExpression17_from.php.tree +++ b/tests/cases/parser/yieldExpression17_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression18.php.tree b/tests/cases/parser/yieldExpression18.php.tree index 0bbdb966..de145511 100644 --- a/tests/cases/parser/yieldExpression18.php.tree +++ b/tests/cases/parser/yieldExpression18.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/yieldExpression19.php.tree b/tests/cases/parser/yieldExpression19.php.tree index 79d897c4..16bf1d6e 100644 --- a/tests/cases/parser/yieldExpression19.php.tree +++ b/tests/cases/parser/yieldExpression19.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, diff --git a/tests/cases/parser/yieldExpression2.php.tree b/tests/cases/parser/yieldExpression2.php.tree index 32831228..4fb986c0 100644 --- a/tests/cases/parser/yieldExpression2.php.tree +++ b/tests/cases/parser/yieldExpression2.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression2_from.php.tree b/tests/cases/parser/yieldExpression2_from.php.tree index 7041b28d..1dd21608 100644 --- a/tests/cases/parser/yieldExpression2_from.php.tree +++ b/tests/cases/parser/yieldExpression2_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression3.php.tree b/tests/cases/parser/yieldExpression3.php.tree index cb98c855..031ccf88 100644 --- a/tests/cases/parser/yieldExpression3.php.tree +++ b/tests/cases/parser/yieldExpression3.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression3_from.php.tree b/tests/cases/parser/yieldExpression3_from.php.tree index 2c468bd7..b6c8bab3 100644 --- a/tests/cases/parser/yieldExpression3_from.php.tree +++ b/tests/cases/parser/yieldExpression3_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression4.php.tree b/tests/cases/parser/yieldExpression4.php.tree index d6eb2007..4dd9fec8 100644 --- a/tests/cases/parser/yieldExpression4.php.tree +++ b/tests/cases/parser/yieldExpression4.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression4_from.php.tree b/tests/cases/parser/yieldExpression4_from.php.tree index dbd42d10..22d377c3 100644 --- a/tests/cases/parser/yieldExpression4_from.php.tree +++ b/tests/cases/parser/yieldExpression4_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression5.php.tree b/tests/cases/parser/yieldExpression5.php.tree index 335382a1..c702c256 100644 --- a/tests/cases/parser/yieldExpression5.php.tree +++ b/tests/cases/parser/yieldExpression5.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression5_from.php.tree b/tests/cases/parser/yieldExpression5_from.php.tree index b493cd8c..29c31172 100644 --- a/tests/cases/parser/yieldExpression5_from.php.tree +++ b/tests/cases/parser/yieldExpression5_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression6.php.tree b/tests/cases/parser/yieldExpression6.php.tree index f4656de8..5d765361 100644 --- a/tests/cases/parser/yieldExpression6.php.tree +++ b/tests/cases/parser/yieldExpression6.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression6_from.php.tree b/tests/cases/parser/yieldExpression6_from.php.tree index fbe53610..552ba20d 100644 --- a/tests/cases/parser/yieldExpression6_from.php.tree +++ b/tests/cases/parser/yieldExpression6_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression7.php.tree b/tests/cases/parser/yieldExpression7.php.tree index 3c9a3a74..02d7e9cf 100644 --- a/tests/cases/parser/yieldExpression7.php.tree +++ b/tests/cases/parser/yieldExpression7.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression7_from.php.tree b/tests/cases/parser/yieldExpression7_from.php.tree index a9670aaa..27378156 100644 --- a/tests/cases/parser/yieldExpression7_from.php.tree +++ b/tests/cases/parser/yieldExpression7_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression8.php.tree b/tests/cases/parser/yieldExpression8.php.tree index 7a464fd2..67a19cf2 100644 --- a/tests/cases/parser/yieldExpression8.php.tree +++ b/tests/cases/parser/yieldExpression8.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression8_from.php.tree b/tests/cases/parser/yieldExpression8_from.php.tree index d14c6d82..38f031a1 100644 --- a/tests/cases/parser/yieldExpression8_from.php.tree +++ b/tests/cases/parser/yieldExpression8_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression9.php.tree b/tests/cases/parser/yieldExpression9.php.tree index b58158f5..31367664 100644 --- a/tests/cases/parser/yieldExpression9.php.tree +++ b/tests/cases/parser/yieldExpression9.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser/yieldExpression9_from.php.tree b/tests/cases/parser/yieldExpression9_from.php.tree index 8cae95fb..840ed6be 100644 --- a/tests/cases/parser/yieldExpression9_from.php.tree +++ b/tests/cases/parser/yieldExpression9_from.php.tree @@ -13,6 +13,7 @@ }, { "FunctionDeclaration": { + "attributes": null, "functionKeyword": { "kind": "FunctionKeyword", "textLength": 8 diff --git a/tests/cases/parser74/arrowFunction.php.tree b/tests/cases/parser74/arrowFunction.php.tree index 6967acd4..a5d88cfb 100644 --- a/tests/cases/parser74/arrowFunction.php.tree +++ b/tests/cases/parser74/arrowFunction.php.tree @@ -31,6 +31,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -47,6 +48,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { @@ -102,6 +104,7 @@ "ExpressionStatement": { "expression": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -153,6 +156,7 @@ "ExpressionStatement": { "expression": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -169,6 +173,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -245,6 +250,7 @@ "ExpressionStatement": { "expression": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -261,6 +267,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -314,6 +321,7 @@ "ExpressionStatement": { "expression": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -333,6 +341,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -383,6 +392,7 @@ "ExpressionStatement": { "expression": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -399,6 +409,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -419,6 +430,7 @@ }, { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -472,6 +484,7 @@ "ExpressionStatement": { "expression": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": { "kind": "StaticKeyword", "textLength": 6 @@ -535,6 +548,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": { "kind": "StaticKeyword", "textLength": 6 diff --git a/tests/cases/parser74/arrowFunctionFallback.php.tree b/tests/cases/parser74/arrowFunctionFallback.php.tree index a20a451f..92d7e493 100644 --- a/tests/cases/parser74/arrowFunctionFallback.php.tree +++ b/tests/cases/parser74/arrowFunctionFallback.php.tree @@ -31,6 +31,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -47,6 +48,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { @@ -136,6 +138,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -221,6 +224,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -237,6 +241,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -332,6 +337,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -348,6 +354,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -420,6 +427,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -444,6 +452,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { @@ -551,6 +560,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -568,6 +578,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -636,6 +647,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -700,6 +712,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", diff --git a/tests/cases/parser74/arrowFunctionTypes.php.tree b/tests/cases/parser74/arrowFunctionTypes.php.tree index 5c1ba39c..2caf4752 100644 --- a/tests/cases/parser74/arrowFunctionTypes.php.tree +++ b/tests/cases/parser74/arrowFunctionTypes.php.tree @@ -31,6 +31,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -47,6 +48,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { @@ -143,6 +145,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -224,6 +227,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -240,6 +244,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -334,6 +339,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -350,6 +356,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -421,6 +428,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -440,6 +448,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { @@ -549,6 +558,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -565,6 +575,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": null, @@ -794,6 +805,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -820,6 +832,7 @@ }, "resultExpression": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -885,6 +898,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -938,6 +952,7 @@ "dotDotDotToken": null, "expression": { "AnonymousFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FunctionKeyword", diff --git a/tests/cases/parser74/arrowFunctionUnionTypes.php.tree b/tests/cases/parser74/arrowFunctionUnionTypes.php.tree index db478c01..d77d542f 100644 --- a/tests/cases/parser74/arrowFunctionUnionTypes.php.tree +++ b/tests/cases/parser74/arrowFunctionUnionTypes.php.tree @@ -15,6 +15,7 @@ "ExpressionStatement": { "expression": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -31,6 +32,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { @@ -106,6 +108,7 @@ "ExpressionStatement": { "expression": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -122,6 +125,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { @@ -216,6 +220,7 @@ "ExpressionStatement": { "expression": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -232,6 +237,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { @@ -379,6 +385,7 @@ "ExpressionStatement": { "expression": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", @@ -395,6 +402,7 @@ "children": [ { "Parameter": { + "attributes": null, "visibilityToken": null, "questionToken": null, "typeDeclaration": { @@ -512,6 +520,7 @@ "ExpressionStatement": { "expression": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", diff --git a/tests/cases/parser74/throwStatement1.php.tree b/tests/cases/parser74/throwStatement1.php.tree index bbc7448b..0c6710dc 100644 --- a/tests/cases/parser74/throwStatement1.php.tree +++ b/tests/cases/parser74/throwStatement1.php.tree @@ -31,6 +31,7 @@ "byRef": null, "rightOperand": { "ArrowFunctionCreationExpression": { + "attributes": null, "staticModifier": null, "functionKeyword": { "kind": "FnKeyword", diff --git a/tests/cases/parser80/attributes1.php b/tests/cases/parser80/attributes1.php new file mode 100644 index 00000000..9655424e --- /dev/null +++ b/tests/cases/parser80/attributes1.php @@ -0,0 +1,3 @@ + 123; diff --git a/tests/cases/parser80/attributes9.php.diag b/tests/cases/parser80/attributes9.php.diag new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/tests/cases/parser80/attributes9.php.diag @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/tests/cases/parser80/attributes9.php.tree b/tests/cases/parser80/attributes9.php.tree new file mode 100644 index 00000000..316f36d3 --- /dev/null +++ b/tests/cases/parser80/attributes9.php.tree @@ -0,0 +1,131 @@ +{ + "SourceFileNode": { + "statementList": [ + { + "InlineHtml": { + "scriptSectionEndTag": null, + "text": null, + "scriptSectionStartTag": { + "kind": "ScriptSectionStartTag", + "textLength": 6 + } + } + }, + { + "ExpressionStatement": { + "expression": { + "AssignmentExpression": { + "leftOperand": { + "Variable": { + "dollar": null, + "name": { + "kind": "VariableName", + "textLength": 3 + } + } + }, + "operator": { + "kind": "EqualsToken", + "textLength": 1 + }, + "byRef": null, + "rightOperand": { + "ArrowFunctionCreationExpression": { + "attributes": [ + { + "AttributeGroup": { + "startToken": { + "kind": "AttributeToken", + "textLength": 2 + }, + "attributes": { + "AttributeElementList": { + "children": [ + { + "Attribute": { + "name": { + "QualifiedName": { + "globalSpecifier": null, + "relativeSpecifier": null, + "nameParts": [ + { + "kind": "Name", + "textLength": 5 + } + ] + } + }, + "openParen": { + "kind": "OpenParenToken", + "textLength": 1 + }, + "argumentExpressionList": null, + "closeParen": { + "kind": "CloseParenToken", + "textLength": 1 + } + } + }, + { + "kind": "CommaToken", + "textLength": 1 + } + ] + } + }, + "endToken": { + "kind": "CloseBracketToken", + "textLength": 1 + } + } + } + ], + "staticModifier": null, + "functionKeyword": { + "kind": "FnKeyword", + "textLength": 2 + }, + "byRefToken": null, + "name": null, + "openParen": { + "kind": "OpenParenToken", + "textLength": 1 + }, + "parameters": null, + "closeParen": { + "kind": "CloseParenToken", + "textLength": 1 + }, + "colonToken": null, + "questionToken": null, + "returnType": null, + "otherReturnTypes": null, + "arrowToken": { + "kind": "DoubleArrowToken", + "textLength": 2 + }, + "resultExpression": { + "NumericLiteral": { + "children": { + "kind": "IntegerLiteralToken", + "textLength": 3 + } + } + } + } + } + } + }, + "semicolon": { + "kind": "SemicolonToken", + "textLength": 1 + } + } + } + ], + "endOfFileToken": { + "kind": "EndOfFileToken", + "textLength": 0 + } + } +} \ No newline at end of file diff --git a/tests/cases/parser80/nullsafe_operator3.php.tree b/tests/cases/parser80/nullsafe_operator3.php.tree deleted file mode 100644 index cf677531..00000000 --- a/tests/cases/parser80/nullsafe_operator3.php.tree +++ /dev/null @@ -1,69 +0,0 @@ -{ - "SourceFileNode": { - "statementList": [ - { - "InlineHtml": { - "scriptSectionEndTag": null, - "text": null, - "scriptSectionStartTag": { - "kind": "ScriptSectionStartTag", - "textLength": 6 - } - } - }, - { - "ExpressionStatement": { - "expression": { - "ObjectCreationExpression": { - "newKeword": { - "kind": "NewKeyword", - "textLength": 3 - }, - "classTypeDesignator": { - "MemberAccessExpression": { - "dereferencableExpression": { - "Variable": { - "dollar": null, - "name": { - "kind": "VariableName", - "textLength": 2 - } - } - }, - "arrowToken": { - "kind": "QuestionArrowToken", - "textLength": 3 - }, - "memberName": { - "kind": "Name", - "textLength": 1 - } - } - }, - "openParen": { - "kind": "OpenParenToken", - "textLength": 1 - }, - "argumentExpressionList": null, - "closeParen": { - "kind": "CloseParenToken", - "textLength": 1 - }, - "classBaseClause": null, - "classInterfaceClause": null, - "classMembers": null - } - }, - "semicolon": { - "kind": "SemicolonToken", - "textLength": 1 - } - } - } - ], - "endOfFileToken": { - "kind": "EndOfFileToken", - "textLength": 0 - } - } -} \ No newline at end of file