File tree Expand file tree Collapse file tree 5 files changed +141
-1
lines changed Expand file tree Collapse file tree 5 files changed +141
-1
lines changed Original file line number Diff line number Diff line change @@ -2397,11 +2397,11 @@ private function parseObjectCreationExpression($parentNode) {
23972397 $ this ->isParsingObjectCreationExpression = true ;
23982398 $ objectCreationExpression ->classTypeDesignator =
23992399 $ this ->eatOptional (TokenKind::ClassKeyword) ??
2400+ $ this ->eatOptional (TokenKind::StaticKeyword) ??
24002401 $ this ->parseExpression ($ objectCreationExpression );
24012402
24022403 $ this ->isParsingObjectCreationExpression = false ;
24032404
2404-
24052405 $ objectCreationExpression ->openParen = $ this ->eatOptional (TokenKind::OpenParenToken);
24062406 if ($ objectCreationExpression ->openParen !== null ) {
24072407 $ objectCreationExpression ->argumentExpressionList = $ this ->parseArgumentExpressionList ($ objectCreationExpression );
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ $ a = new static ;
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+ "ExpressionStatement": {
16+ "expression": {
17+ "AssignmentExpression": {
18+ "leftOperand": {
19+ "Variable": {
20+ "dollar": null,
21+ "name": {
22+ "kind": "VariableName",
23+ "textLength": 2
24+ }
25+ }
26+ },
27+ "operator": {
28+ "kind": "EqualsToken",
29+ "textLength": 1
30+ },
31+ "byRef": null,
32+ "rightOperand": {
33+ "ObjectCreationExpression": {
34+ "newKeword": {
35+ "kind": "NewKeyword",
36+ "textLength": 3
37+ },
38+ "classTypeDesignator": {
39+ "kind": "StaticKeyword",
40+ "textLength": 6
41+ },
42+ "openParen": null,
43+ "argumentExpressionList": null,
44+ "closeParen": null,
45+ "classBaseClause": null,
46+ "classInterfaceClause": null,
47+ "classMembers": null
48+ }
49+ }
50+ }
51+ },
52+ "semicolon": {
53+ "kind": "SemicolonToken",
54+ "textLength": 1
55+ }
56+ }
57+ }
58+ ],
59+ "endOfFileToken": {
60+ "kind": "EndOfFileToken",
61+ "textLength": 0
62+ }
63+ }
64+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ $ a = new static ();
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+ "ExpressionStatement": {
16+ "expression": {
17+ "AssignmentExpression": {
18+ "leftOperand": {
19+ "Variable": {
20+ "dollar": null,
21+ "name": {
22+ "kind": "VariableName",
23+ "textLength": 2
24+ }
25+ }
26+ },
27+ "operator": {
28+ "kind": "EqualsToken",
29+ "textLength": 1
30+ },
31+ "byRef": null,
32+ "rightOperand": {
33+ "ObjectCreationExpression": {
34+ "newKeword": {
35+ "kind": "NewKeyword",
36+ "textLength": 3
37+ },
38+ "classTypeDesignator": {
39+ "kind": "StaticKeyword",
40+ "textLength": 6
41+ },
42+ "openParen": {
43+ "kind": "OpenParenToken",
44+ "textLength": 1
45+ },
46+ "argumentExpressionList": null,
47+ "closeParen": {
48+ "kind": "CloseParenToken",
49+ "textLength": 1
50+ },
51+ "classBaseClause": null,
52+ "classInterfaceClause": null,
53+ "classMembers": null
54+ }
55+ }
56+ }
57+ },
58+ "semicolon": {
59+ "kind": "SemicolonToken",
60+ "textLength": 1
61+ }
62+ }
63+ }
64+ ],
65+ "endOfFileToken": {
66+ "kind": "EndOfFileToken",
67+ "textLength": 0
68+ }
69+ }
70+ }
You can’t perform that action at this time.
0 commit comments