File tree Expand file tree Collapse file tree 9 files changed +110
-4
lines changed Expand file tree Collapse file tree 9 files changed +110
-4
lines changed Original file line number Diff line number Diff line change @@ -757,7 +757,8 @@ private function parseAttributeGroups($parentNode): array
757757 while ($ attributeToken = $ this ->eatOptional1 (TokenKind::AttributeToken)) {
758758 $ attributeGroup = new AttributeGroup ();
759759 $ attributeGroup ->startToken = $ attributeToken ;
760- $ attributeGroup ->attributes = $ this ->parseAttributeElementList ($ attributeGroup );
760+ $ attributeGroup ->attributes = $ this ->parseAttributeElementList ($ attributeGroup )
761+ ?: (new MissingToken (TokenKind::Name, $ this ->token ->fullStart ));
761762 $ attributeGroup ->endToken = $ this ->eat1 (TokenKind::CloseBracketToken);
762763 $ attributeGroup ->parent = $ parentNode ;
763764 $ attributeGroups [] = $ attributeGroup ;
Original file line number Diff line number Diff line change 1111 "start": 12,
1212 "length": 0
1313 },
14+ {
15+ "kind": 0,
16+ "message": "'Name' expected.",
17+ "start": 15,
18+ "length": 0
19+ },
1420 {
1521 "kind": 0,
1622 "message": "']' expected.",
Original file line number Diff line number Diff line change 4040 "kind": "AttributeToken",
4141 "textLength": 2
4242 },
43- "attributes": null,
43+ "attributes": {
44+ "error": "MissingToken",
45+ "kind": "Name",
46+ "textLength": 0
47+ },
4448 "endToken": {
4549 "error": "MissingToken",
4650 "kind": "CloseBracketToken",
Original file line number Diff line number Diff line change 1111 "start": 15,
1212 "length": 0
1313 },
14+ {
15+ "kind": 0,
16+ "message": "'Name' expected.",
17+ "start": 18,
18+ "length": 0
19+ },
1420 {
1521 "kind": 0,
1622 "message": "']' expected.",
Original file line number Diff line number Diff line change 4141 "kind": "AttributeToken",
4242 "textLength": 2
4343 },
44- "attributes": null,
44+ "attributes": {
45+ "error": "MissingToken",
46+ "kind": "Name",
47+ "textLength": 0
48+ },
4549 "endToken": {
4650 "error": "MissingToken",
4751 "kind": "CloseBracketToken",
Original file line number Diff line number Diff line change 55 "start": 8,
66 "length": 0
77 },
8+ {
9+ "kind": 0,
10+ "message": "'Name' expected.",
11+ "start": 11,
12+ "length": 0
13+ },
814 {
915 "kind": 0,
1016 "message": "']' expected.",
Original file line number Diff line number Diff line change 4040 "kind": "AttributeToken",
4141 "textLength": 2
4242 },
43- "attributes": null,
43+ "attributes": {
44+ "error": "MissingToken",
45+ "kind": "Name",
46+ "textLength": 0
47+ },
4448 "endToken": {
4549 "error": "MissingToken",
4650 "kind": "CloseBracketToken",
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "kind": 0,
4+ "message": "'Name' expected.",
5+ "start": 8,
6+ "length": 0
7+ }
8+ ]
Original file line number Diff line number Diff line change 1+ {
2+ "SourceFileNode": {
3+ "statementList": [
4+ {
5+ "InlineHtml": {
6+ "scriptSectionEndTag": null,
7+ "text": null,
8+ "scriptSectionStartTag": {
9+ "kind": "ScriptSectionStartTag",
10+ "textLength": 6
11+ }
12+ }
13+ },
14+ {
15+ "ClassDeclaration": {
16+ "attributes": [
17+ {
18+ "AttributeGroup": {
19+ "startToken": {
20+ "kind": "AttributeToken",
21+ "textLength": 2
22+ },
23+ "attributes": {
24+ "error": "MissingToken",
25+ "kind": "Name",
26+ "textLength": 0
27+ },
28+ "endToken": {
29+ "kind": "CloseBracketToken",
30+ "textLength": 1
31+ }
32+ }
33+ }
34+ ],
35+ "abstractOrFinalModifier": null,
36+ "classKeyword": {
37+ "kind": "ClassKeyword",
38+ "textLength": 5
39+ },
40+ "name": {
41+ "kind": "Name",
42+ "textLength": 1
43+ },
44+ "classBaseClause": null,
45+ "classInterfaceClause": null,
46+ "classMembers": {
47+ "ClassMembersNode": {
48+ "openBrace": {
49+ "kind": "OpenBraceToken",
50+ "textLength": 1
51+ },
52+ "classMemberDeclarations": [],
53+ "closeBrace": {
54+ "kind": "CloseBraceToken",
55+ "textLength": 1
56+ }
57+ }
58+ }
59+ }
60+ }
61+ ],
62+ "endOfFileToken": {
63+ "kind": "EndOfFileToken",
64+ "textLength": 0
65+ }
66+ }
67+ }
You can’t perform that action at this time.
0 commit comments