|
6 | 6 | use TypeLang\Parser\Exception\FeatureNotAllowedException;
|
7 | 7 |
|
8 | 8 | return [
|
9 |
| - 'initial' => 'Type', |
| 9 | + 'initial' => 49, |
10 | 10 | 'tokens' => [
|
11 | 11 | 'default' => [
|
12 | 12 | 'T_DQ_STRING_LITERAL' => '"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"',
|
|
98 | 98 | 37 => new \Phplrt\Parser\Grammar\Lexeme('T_ASTERISK', true),
|
99 | 99 | 38 => new \Phplrt\Parser\Grammar\Lexeme('T_DOUBLE_COLON', false),
|
100 | 100 | 39 => new \Phplrt\Parser\Grammar\Alternation([36, 3, 37]),
|
101 |
| - 40 => new \Phplrt\Parser\Grammar\Concatenation(['Type']), |
| 101 | + 40 => new \Phplrt\Parser\Grammar\Concatenation([49]), |
102 | 102 | 41 => new \Phplrt\Parser\Grammar\Lexeme('T_COMMA', false),
|
103 | 103 | 42 => new \Phplrt\Parser\Grammar\Concatenation([41, 40]),
|
104 | 104 | 43 => new \Phplrt\Parser\Grammar\Lexeme('T_COMMA', false),
|
|
107 | 107 | 46 => new \Phplrt\Parser\Grammar\Optional(43),
|
108 | 108 | 47 => new \Phplrt\Parser\Grammar\Lexeme('T_ANGLE_BRACKET_CLOSE', false),
|
109 | 109 | 48 => new \Phplrt\Parser\Grammar\Concatenation([44, 40, 45, 46, 47]),
|
110 |
| - 49 => new \Phplrt\Parser\Grammar\Concatenation([56, 60, 61]), |
111 |
| - 50 => new \Phplrt\Parser\Grammar\Concatenation([75, 'Type']), |
112 |
| - 51 => new \Phplrt\Parser\Grammar\Lexeme('T_PARENTHESIS_OPEN', false), |
113 |
| - 52 => new \Phplrt\Parser\Grammar\Optional(49), |
114 |
| - 53 => new \Phplrt\Parser\Grammar\Lexeme('T_PARENTHESIS_CLOSE', false), |
115 |
| - 54 => new \Phplrt\Parser\Grammar\Optional(50), |
116 |
| - 55 => new \Phplrt\Parser\Grammar\Concatenation([2, 51, 52, 53, 54]), |
117 |
| - 56 => new \Phplrt\Parser\Grammar\Concatenation([62, 64]), |
118 |
| - 57 => new \Phplrt\Parser\Grammar\Lexeme('T_COMMA', false), |
119 |
| - 58 => new \Phplrt\Parser\Grammar\Concatenation([57, 56]), |
120 |
| - 59 => new \Phplrt\Parser\Grammar\Lexeme('T_COMMA', false), |
121 |
| - 60 => new \Phplrt\Parser\Grammar\Repetition(58, 0, INF), |
122 |
| - 61 => new \Phplrt\Parser\Grammar\Optional(59), |
123 |
| - 62 => new \Phplrt\Parser\Grammar\Concatenation([65, 66]), |
124 |
| - 63 => new \Phplrt\Parser\Grammar\Lexeme('T_ASSIGN', true), |
125 |
| - 64 => new \Phplrt\Parser\Grammar\Optional(63), |
126 |
| - 65 => new \Phplrt\Parser\Grammar\Alternation([69, 72]), |
127 |
| - 66 => new \Phplrt\Parser\Grammar\Optional(24), |
128 |
| - 67 => new \Phplrt\Parser\Grammar\Concatenation(['Type', 74]), |
129 |
| - 68 => new \Phplrt\Parser\Grammar\Lexeme('T_ELLIPSIS', true), |
130 |
| - 69 => new \Phplrt\Parser\Grammar\Concatenation([68, 67]), |
131 |
| - 70 => new \Phplrt\Parser\Grammar\Lexeme('T_ELLIPSIS', true), |
132 |
| - 71 => new \Phplrt\Parser\Grammar\Optional(70), |
133 |
| - 72 => new \Phplrt\Parser\Grammar\Concatenation([67, 71]), |
134 |
| - 73 => new \Phplrt\Parser\Grammar\Lexeme('T_AMP', true), |
135 |
| - 74 => new \Phplrt\Parser\Grammar\Optional(73), |
136 |
| - 75 => new \Phplrt\Parser\Grammar\Lexeme('T_COLON', false), |
137 |
| - 76 => new \Phplrt\Parser\Grammar\Concatenation([91, 94]), |
138 |
| - 77 => new \Phplrt\Parser\Grammar\Concatenation([89, 90]), |
139 |
| - 78 => new \Phplrt\Parser\Grammar\Lexeme('T_COMMA', false), |
140 |
| - 79 => new \Phplrt\Parser\Grammar\Concatenation([78, 77]), |
141 |
| - 80 => new \Phplrt\Parser\Grammar\Optional(79), |
142 |
| - 81 => new \Phplrt\Parser\Grammar\Concatenation([76, 80]), |
143 |
| - 82 => new \Phplrt\Parser\Grammar\Optional(77), |
144 |
| - 83 => new \Phplrt\Parser\Grammar\Lexeme('T_COMMA', false), |
145 |
| - 84 => new \Phplrt\Parser\Grammar\Lexeme('T_BRACE_OPEN', false), |
146 |
| - 85 => new \Phplrt\Parser\Grammar\Alternation([81, 82]), |
147 |
| - 86 => new \Phplrt\Parser\Grammar\Optional(83), |
148 |
| - 87 => new \Phplrt\Parser\Grammar\Lexeme('T_BRACE_CLOSE', false), |
149 |
| - 88 => new \Phplrt\Parser\Grammar\Concatenation([84, 85, 86, 87]), |
150 |
| - 89 => new \Phplrt\Parser\Grammar\Lexeme('T_ELLIPSIS', true), |
151 |
| - 90 => new \Phplrt\Parser\Grammar\Optional(48), |
152 |
| - 91 => new \Phplrt\Parser\Grammar\Alternation([95, 96]), |
153 |
| - 92 => new \Phplrt\Parser\Grammar\Lexeme('T_COMMA', false), |
154 |
| - 93 => new \Phplrt\Parser\Grammar\Concatenation([92, 91]), |
155 |
| - 94 => new \Phplrt\Parser\Grammar\Repetition(93, 0, INF), |
156 |
| - 95 => new \Phplrt\Parser\Grammar\Concatenation([97, 100, 101, 99]), |
157 |
| - 96 => new \Phplrt\Parser\Grammar\Concatenation([99]), |
158 |
| - 97 => new \Phplrt\Parser\Grammar\Alternation([3, 21, 19]), |
159 |
| - 98 => new \Phplrt\Parser\Grammar\Lexeme('T_QMARK', true), |
160 |
| - 99 => new \Phplrt\Parser\Grammar\Concatenation(['Type']), |
161 |
| - 100 => new \Phplrt\Parser\Grammar\Optional(98), |
162 |
| - 101 => new \Phplrt\Parser\Grammar\Lexeme('T_COLON', false), |
163 |
| - 102 => new \Phplrt\Parser\Grammar\Alternation([48, 88]), |
164 |
| - 103 => new \Phplrt\Parser\Grammar\Optional(102), |
165 |
| - 104 => new \Phplrt\Parser\Grammar\Concatenation([2, 103]), |
166 |
| - 105 => new \Phplrt\Parser\Grammar\Concatenation([118]), |
167 |
| - 106 => new \Phplrt\Parser\Grammar\Optional(108), |
168 |
| - 107 => new \Phplrt\Parser\Grammar\Concatenation([105, 106]), |
169 |
| - 108 => new \Phplrt\Parser\Grammar\Concatenation([113, 114, 115, 'Type', 116, 'Type']), |
170 |
| - 109 => new \Phplrt\Parser\Grammar\Concatenation([24, 108]), |
171 |
| - 110 => new \Phplrt\Parser\Grammar\Alternation([107, 109]), |
172 |
| - 111 => new \Phplrt\Parser\Grammar\Lexeme('T_EQ', true), |
173 |
| - 112 => new \Phplrt\Parser\Grammar\Lexeme('T_NEQ', true), |
174 |
| - 113 => new \Phplrt\Parser\Grammar\Alternation([111, 112]), |
175 |
| - 114 => new \Phplrt\Parser\Grammar\Alternation([24, 'Type']), |
176 |
| - 115 => new \Phplrt\Parser\Grammar\Lexeme('T_QMARK', false), |
177 |
| - 116 => new \Phplrt\Parser\Grammar\Lexeme('T_COLON', false), |
178 |
| - 117 => new \Phplrt\Parser\Grammar\Concatenation([110]), |
179 |
| - 118 => new \Phplrt\Parser\Grammar\Concatenation([119, 122]), |
180 |
| - 119 => new \Phplrt\Parser\Grammar\Concatenation([123, 126]), |
181 |
| - 120 => new \Phplrt\Parser\Grammar\Lexeme('T_OR', false), |
182 |
| - 121 => new \Phplrt\Parser\Grammar\Concatenation([120, 118]), |
183 |
| - 122 => new \Phplrt\Parser\Grammar\Optional(121), |
184 |
| - 123 => new \Phplrt\Parser\Grammar\Concatenation([127]), |
185 |
| - 124 => new \Phplrt\Parser\Grammar\Lexeme('T_AMP', false), |
186 |
| - 125 => new \Phplrt\Parser\Grammar\Concatenation([124, 119]), |
187 |
| - 126 => new \Phplrt\Parser\Grammar\Optional(125), |
188 |
| - 127 => new \Phplrt\Parser\Grammar\Alternation([130, 128]), |
189 |
| - 128 => new \Phplrt\Parser\Grammar\Concatenation([131, 135]), |
190 |
| - 129 => new \Phplrt\Parser\Grammar\Lexeme('T_QMARK', true), |
191 |
| - 130 => new \Phplrt\Parser\Grammar\Concatenation([129, 128]), |
192 |
| - 132 => new \Phplrt\Parser\Grammar\Lexeme('T_SQUARE_BRACKET_OPEN', true), |
193 |
| - 133 => new \Phplrt\Parser\Grammar\Lexeme('T_SQUARE_BRACKET_CLOSE', false), |
194 |
| - 134 => new \Phplrt\Parser\Grammar\Concatenation([132, 133]), |
195 |
| - 135 => new \Phplrt\Parser\Grammar\Repetition(134, 0, INF), |
196 |
| - 136 => new \Phplrt\Parser\Grammar\Lexeme('T_PARENTHESIS_OPEN', false), |
197 |
| - 137 => new \Phplrt\Parser\Grammar\Lexeme('T_PARENTHESIS_CLOSE', false), |
198 |
| - 138 => new \Phplrt\Parser\Grammar\Concatenation([136, 'Type', 137]), |
199 |
| - 'Type' => new \Phplrt\Parser\Grammar\Concatenation([117]), |
200 |
| - 131 => new \Phplrt\Parser\Grammar\Alternation([138, 18, 55, 104]) |
| 110 | + 49 => new \Phplrt\Parser\Grammar\Concatenation([118]), |
| 111 | + 50 => new \Phplrt\Parser\Grammar\Concatenation([57, 61, 62]), |
| 112 | + 51 => new \Phplrt\Parser\Grammar\Concatenation([76, 49]), |
| 113 | + 52 => new \Phplrt\Parser\Grammar\Lexeme('T_PARENTHESIS_OPEN', false), |
| 114 | + 53 => new \Phplrt\Parser\Grammar\Optional(50), |
| 115 | + 54 => new \Phplrt\Parser\Grammar\Lexeme('T_PARENTHESIS_CLOSE', false), |
| 116 | + 55 => new \Phplrt\Parser\Grammar\Optional(51), |
| 117 | + 56 => new \Phplrt\Parser\Grammar\Concatenation([2, 52, 53, 54, 55]), |
| 118 | + 57 => new \Phplrt\Parser\Grammar\Concatenation([63, 65]), |
| 119 | + 58 => new \Phplrt\Parser\Grammar\Lexeme('T_COMMA', false), |
| 120 | + 59 => new \Phplrt\Parser\Grammar\Concatenation([58, 57]), |
| 121 | + 60 => new \Phplrt\Parser\Grammar\Lexeme('T_COMMA', false), |
| 122 | + 61 => new \Phplrt\Parser\Grammar\Repetition(59, 0, INF), |
| 123 | + 62 => new \Phplrt\Parser\Grammar\Optional(60), |
| 124 | + 63 => new \Phplrt\Parser\Grammar\Concatenation([66, 67]), |
| 125 | + 64 => new \Phplrt\Parser\Grammar\Lexeme('T_ASSIGN', true), |
| 126 | + 65 => new \Phplrt\Parser\Grammar\Optional(64), |
| 127 | + 66 => new \Phplrt\Parser\Grammar\Alternation([70, 73]), |
| 128 | + 67 => new \Phplrt\Parser\Grammar\Optional(24), |
| 129 | + 68 => new \Phplrt\Parser\Grammar\Concatenation([49, 75]), |
| 130 | + 69 => new \Phplrt\Parser\Grammar\Lexeme('T_ELLIPSIS', true), |
| 131 | + 70 => new \Phplrt\Parser\Grammar\Concatenation([69, 68]), |
| 132 | + 71 => new \Phplrt\Parser\Grammar\Lexeme('T_ELLIPSIS', true), |
| 133 | + 72 => new \Phplrt\Parser\Grammar\Optional(71), |
| 134 | + 73 => new \Phplrt\Parser\Grammar\Concatenation([68, 72]), |
| 135 | + 74 => new \Phplrt\Parser\Grammar\Lexeme('T_AMP', true), |
| 136 | + 75 => new \Phplrt\Parser\Grammar\Optional(74), |
| 137 | + 76 => new \Phplrt\Parser\Grammar\Lexeme('T_COLON', false), |
| 138 | + 77 => new \Phplrt\Parser\Grammar\Concatenation([92, 95]), |
| 139 | + 78 => new \Phplrt\Parser\Grammar\Concatenation([90, 91]), |
| 140 | + 79 => new \Phplrt\Parser\Grammar\Lexeme('T_COMMA', false), |
| 141 | + 80 => new \Phplrt\Parser\Grammar\Concatenation([79, 78]), |
| 142 | + 81 => new \Phplrt\Parser\Grammar\Optional(80), |
| 143 | + 82 => new \Phplrt\Parser\Grammar\Concatenation([77, 81]), |
| 144 | + 83 => new \Phplrt\Parser\Grammar\Optional(78), |
| 145 | + 84 => new \Phplrt\Parser\Grammar\Lexeme('T_COMMA', false), |
| 146 | + 85 => new \Phplrt\Parser\Grammar\Lexeme('T_BRACE_OPEN', false), |
| 147 | + 86 => new \Phplrt\Parser\Grammar\Alternation([82, 83]), |
| 148 | + 87 => new \Phplrt\Parser\Grammar\Optional(84), |
| 149 | + 88 => new \Phplrt\Parser\Grammar\Lexeme('T_BRACE_CLOSE', false), |
| 150 | + 89 => new \Phplrt\Parser\Grammar\Concatenation([85, 86, 87, 88]), |
| 151 | + 90 => new \Phplrt\Parser\Grammar\Lexeme('T_ELLIPSIS', true), |
| 152 | + 91 => new \Phplrt\Parser\Grammar\Optional(48), |
| 153 | + 92 => new \Phplrt\Parser\Grammar\Alternation([96, 97]), |
| 154 | + 93 => new \Phplrt\Parser\Grammar\Lexeme('T_COMMA', false), |
| 155 | + 94 => new \Phplrt\Parser\Grammar\Concatenation([93, 92]), |
| 156 | + 95 => new \Phplrt\Parser\Grammar\Repetition(94, 0, INF), |
| 157 | + 96 => new \Phplrt\Parser\Grammar\Concatenation([98, 101, 102, 100]), |
| 158 | + 97 => new \Phplrt\Parser\Grammar\Concatenation([100]), |
| 159 | + 98 => new \Phplrt\Parser\Grammar\Alternation([3, 21, 19]), |
| 160 | + 99 => new \Phplrt\Parser\Grammar\Lexeme('T_QMARK', true), |
| 161 | + 100 => new \Phplrt\Parser\Grammar\Concatenation([49]), |
| 162 | + 101 => new \Phplrt\Parser\Grammar\Optional(99), |
| 163 | + 102 => new \Phplrt\Parser\Grammar\Lexeme('T_COLON', false), |
| 164 | + 103 => new \Phplrt\Parser\Grammar\Alternation([48, 89]), |
| 165 | + 104 => new \Phplrt\Parser\Grammar\Optional(103), |
| 166 | + 105 => new \Phplrt\Parser\Grammar\Concatenation([2, 104]), |
| 167 | + 106 => new \Phplrt\Parser\Grammar\Concatenation([119]), |
| 168 | + 107 => new \Phplrt\Parser\Grammar\Optional(109), |
| 169 | + 108 => new \Phplrt\Parser\Grammar\Concatenation([106, 107]), |
| 170 | + 109 => new \Phplrt\Parser\Grammar\Concatenation([114, 115, 116, 49, 117, 49]), |
| 171 | + 110 => new \Phplrt\Parser\Grammar\Concatenation([24, 109]), |
| 172 | + 111 => new \Phplrt\Parser\Grammar\Alternation([108, 110]), |
| 173 | + 112 => new \Phplrt\Parser\Grammar\Lexeme('T_EQ', true), |
| 174 | + 113 => new \Phplrt\Parser\Grammar\Lexeme('T_NEQ', true), |
| 175 | + 114 => new \Phplrt\Parser\Grammar\Alternation([112, 113]), |
| 176 | + 115 => new \Phplrt\Parser\Grammar\Alternation([24, 49]), |
| 177 | + 116 => new \Phplrt\Parser\Grammar\Lexeme('T_QMARK', false), |
| 178 | + 117 => new \Phplrt\Parser\Grammar\Lexeme('T_COLON', false), |
| 179 | + 118 => new \Phplrt\Parser\Grammar\Concatenation([111]), |
| 180 | + 119 => new \Phplrt\Parser\Grammar\Concatenation([120, 123]), |
| 181 | + 120 => new \Phplrt\Parser\Grammar\Concatenation([124, 127]), |
| 182 | + 121 => new \Phplrt\Parser\Grammar\Lexeme('T_OR', false), |
| 183 | + 122 => new \Phplrt\Parser\Grammar\Concatenation([121, 119]), |
| 184 | + 123 => new \Phplrt\Parser\Grammar\Optional(122), |
| 185 | + 124 => new \Phplrt\Parser\Grammar\Concatenation([128]), |
| 186 | + 125 => new \Phplrt\Parser\Grammar\Lexeme('T_AMP', false), |
| 187 | + 126 => new \Phplrt\Parser\Grammar\Concatenation([125, 120]), |
| 188 | + 127 => new \Phplrt\Parser\Grammar\Optional(126), |
| 189 | + 128 => new \Phplrt\Parser\Grammar\Alternation([131, 129]), |
| 190 | + 129 => new \Phplrt\Parser\Grammar\Concatenation([132, 136]), |
| 191 | + 130 => new \Phplrt\Parser\Grammar\Lexeme('T_QMARK', true), |
| 192 | + 131 => new \Phplrt\Parser\Grammar\Concatenation([130, 129]), |
| 193 | + 133 => new \Phplrt\Parser\Grammar\Lexeme('T_SQUARE_BRACKET_OPEN', true), |
| 194 | + 134 => new \Phplrt\Parser\Grammar\Lexeme('T_SQUARE_BRACKET_CLOSE', false), |
| 195 | + 135 => new \Phplrt\Parser\Grammar\Concatenation([133, 134]), |
| 196 | + 136 => new \Phplrt\Parser\Grammar\Repetition(135, 0, INF), |
| 197 | + 137 => new \Phplrt\Parser\Grammar\Lexeme('T_PARENTHESIS_OPEN', false), |
| 198 | + 138 => new \Phplrt\Parser\Grammar\Lexeme('T_PARENTHESIS_CLOSE', false), |
| 199 | + 139 => new \Phplrt\Parser\Grammar\Concatenation([137, 49, 138]), |
| 200 | + 132 => new \Phplrt\Parser\Grammar\Alternation([139, 18, 56, 105]) |
201 | 201 | ],
|
202 | 202 | 'reducers' => [
|
203 | 203 | 0 => function (\Phplrt\Parser\Context $ctx, $children) {
|
|
279 | 279 | \is_array($children) ? $children[0] : $children,
|
280 | 280 | );
|
281 | 281 | },
|
282 |
| - 55 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 282 | + 56 => function (\Phplrt\Parser\Context $ctx, $children) { |
283 | 283 | $token = $ctx->getToken();
|
284 | 284 | $offset = $token->getOffset();
|
285 | 285 | $name = \array_shift($children);
|
|
298 | 298 | type: isset($children[0]) ? $children[0] : null,
|
299 | 299 | );
|
300 | 300 | },
|
301 |
| - 49 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 301 | + 50 => function (\Phplrt\Parser\Context $ctx, $children) { |
302 | 302 | return new Node\Stmt\Callable\ParametersListNode($children);
|
303 | 303 | },
|
304 |
| - 56 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 304 | + 57 => function (\Phplrt\Parser\Context $ctx, $children) { |
305 | 305 | $token = $ctx->getToken();
|
306 | 306 | $offset = $token->getOffset();
|
307 | 307 | if (!isset($children[1])) {
|
|
315 | 315 | $children[0]->optional = true;
|
316 | 316 | return $children[0];
|
317 | 317 | },
|
318 |
| - 62 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 318 | + 63 => function (\Phplrt\Parser\Context $ctx, $children) { |
319 | 319 | if (\count($children) === 1) {
|
320 | 320 | return $children[0];
|
321 | 321 | }
|
322 | 322 |
|
323 | 323 | $children[0]->name = $children[1];
|
324 | 324 | return $children[0];
|
325 | 325 | },
|
326 |
| - 65 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 326 | + 66 => function (\Phplrt\Parser\Context $ctx, $children) { |
327 | 327 | if (!isset($children[1])) {
|
328 | 328 | return $children[0];
|
329 | 329 | }
|
|
336 | 336 | $children[1]->variadic = true;
|
337 | 337 | return $children[1];
|
338 | 338 | },
|
339 |
| - 67 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 339 | + 68 => function (\Phplrt\Parser\Context $ctx, $children) { |
340 | 340 | $argument = new Node\Stmt\Callable\ParameterNode($children[0]);
|
341 | 341 |
|
342 | 342 | if (\count($children) !== 1) {
|
|
345 | 345 |
|
346 | 346 | return $argument;
|
347 | 347 | },
|
348 |
| - 88 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 348 | + 89 => function (\Phplrt\Parser\Context $ctx, $children) { |
349 | 349 | $token = $ctx->getToken();
|
350 | 350 | $offset = $token->getOffset();
|
351 | 351 | if ($children === []) {
|
|
372 | 372 |
|
373 | 373 | return \array_filter([$parameters, $fields]);
|
374 | 374 | },
|
375 |
| - 76 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 375 | + 77 => function (\Phplrt\Parser\Context $ctx, $children) { |
376 | 376 | $token = $ctx->getToken();
|
377 | 377 | $offset = $token->getOffset();
|
378 | 378 | $explicit = [];
|
|
398 | 398 |
|
399 | 399 | return new Node\Stmt\Shape\FieldsListNode($children);
|
400 | 400 | },
|
401 |
| - 95 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 401 | + 96 => function (\Phplrt\Parser\Context $ctx, $children) { |
402 | 402 | $name = $children[0];
|
403 | 403 | $value = \array_pop($children);
|
404 | 404 |
|
|
413 | 413 | default => new Node\Stmt\Shape\NamedFieldNode($name, $value, $optional),
|
414 | 414 | };
|
415 | 415 | },
|
416 |
| - 96 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 416 | + 97 => function (\Phplrt\Parser\Context $ctx, $children) { |
417 | 417 | return new Node\Stmt\Shape\ImplicitFieldNode($children[0]);
|
418 | 418 | },
|
419 |
| - 104 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 419 | + 105 => function (\Phplrt\Parser\Context $ctx, $children) { |
420 | 420 | $fields = $parameters = null;
|
421 | 421 |
|
422 | 422 | // Shape fields
|
|
435 | 435 | $fields,
|
436 | 436 | );
|
437 | 437 | },
|
438 |
| - 110 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 438 | + 111 => function (\Phplrt\Parser\Context $ctx, $children) { |
439 | 439 | $token = $ctx->getToken();
|
440 | 440 | $offset = $token->getOffset();
|
441 | 441 | $count = \count($children);
|
|
469 | 469 | $children[4],
|
470 | 470 | );
|
471 | 471 | },
|
472 |
| - 118 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 472 | + 119 => function (\Phplrt\Parser\Context $ctx, $children) { |
473 | 473 | if (\count($children) === 2) {
|
474 | 474 | return new Node\Stmt\UnionTypeNode($children[0], $children[1]);
|
475 | 475 | }
|
476 | 476 |
|
477 | 477 | return $children;
|
478 | 478 | },
|
479 |
| - 119 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 479 | + 120 => function (\Phplrt\Parser\Context $ctx, $children) { |
480 | 480 | if (\count($children) === 2) {
|
481 | 481 | return new Node\Stmt\IntersectionTypeNode($children[0], $children[1]);
|
482 | 482 | }
|
483 | 483 |
|
484 | 484 | return $children;
|
485 | 485 | },
|
486 |
| - 127 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 486 | + 128 => function (\Phplrt\Parser\Context $ctx, $children) { |
487 | 487 | if (\is_array($children)) {
|
488 | 488 | return new Node\Stmt\NullableTypeNode($children[1]);
|
489 | 489 | }
|
490 | 490 |
|
491 | 491 | return $children;
|
492 | 492 | },
|
493 |
| - 128 => function (\Phplrt\Parser\Context $ctx, $children) { |
| 493 | + 129 => function (\Phplrt\Parser\Context $ctx, $children) { |
494 | 494 | $statement = \array_shift($children);
|
495 | 495 |
|
496 | 496 | for ($i = 0, $length = \count($children); $i < $length; ++$i) {
|
|
0 commit comments