Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Side by Side Diff: pkg/compiler/lib/src/resolution/semantic_visitor.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.semantics_visitor; 5 library dart2js.semantics_visitor;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../constants/expressions.dart'; 8 import '../constants/expressions.dart';
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../tree/tree.dart'; 10 import '../tree/tree.dart';
11 import '../elements/elements.dart'; 11 import '../elements/elements.dart';
12 import '../universe/call_structure.dart' show 12 import '../universe/call_structure.dart' show CallStructure;
13 CallStructure; 13 import '../universe/selector.dart' show Selector;
14 import '../universe/selector.dart' show
15 Selector;
16 14
17 import 'operators.dart'; 15 import 'operators.dart';
18 import 'send_resolver.dart'; 16 import 'send_resolver.dart';
19 import 'send_structure.dart'; 17 import 'send_structure.dart';
20 import 'tree_elements.dart'; 18 import 'tree_elements.dart';
21 19
22 part 'semantic_visitor_mixins.dart'; 20 part 'semantic_visitor_mixins.dart';
23 21
24 /// Mixin that couples a [SendResolverMixin] to a [SemanticSendVisitor] in a 22 /// Mixin that couples a [SendResolverMixin] to a [SemanticSendVisitor] in a
25 /// [Visitor]. 23 /// [Visitor].
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } else { 69 } else {
72 return structure.dispatch(sendVisitor, node, arg); 70 return structure.dispatch(sendVisitor, node, arg);
73 } 71 }
74 } 72 }
75 } 73 }
76 74
77 /// Mixin that couples a [DeclarationResolverMixin] to a 75 /// Mixin that couples a [DeclarationResolverMixin] to a
78 /// [SemanticDeclarationVisitor] in a [Visitor]. 76 /// [SemanticDeclarationVisitor] in a [Visitor].
79 abstract class SemanticDeclarationResolvedMixin<R, A> 77 abstract class SemanticDeclarationResolvedMixin<R, A>
80 implements Visitor<R>, DeclarationResolverMixin { 78 implements Visitor<R>, DeclarationResolverMixin {
81
82 SemanticDeclarationVisitor<R, A> get declVisitor; 79 SemanticDeclarationVisitor<R, A> get declVisitor;
83 80
84 @override 81 @override
85 R visitFunctionExpression(FunctionExpression node) { 82 R visitFunctionExpression(FunctionExpression node) {
86 // TODO(johnniwinther): Support argument. 83 // TODO(johnniwinther): Support argument.
87 A arg = null; 84 A arg = null;
88 85
89 DeclStructure structure = computeFunctionStructure(node); 86 DeclStructure structure = computeFunctionStructure(node);
90 if (structure == null) { 87 if (structure == null) {
91 return internalError(node, 'No structure for $node'); 88 return internalError(node, 'No structure for $node');
(...skipping 15 matching lines...) Expand all
107 for (ParameterStructure structure in structures) { 104 for (ParameterStructure structure in structures) {
108 structure.dispatch(declVisitor, arg); 105 structure.dispatch(declVisitor, arg);
109 } 106 }
110 } 107 }
111 108
112 @override 109 @override
113 R visitVariableDefinitions(VariableDefinitions definitions) { 110 R visitVariableDefinitions(VariableDefinitions definitions) {
114 // TODO(johnniwinther): Support argument. 111 // TODO(johnniwinther): Support argument.
115 A arg = null; 112 A arg = null;
116 113
117 computeVariableStructures( 114 computeVariableStructures(definitions,
118 definitions,
119 (Node node, VariableStructure structure) { 115 (Node node, VariableStructure structure) {
120 if (structure == null) { 116 if (structure == null) {
121 return internalError(node, 'No structure for $node'); 117 return internalError(node, 'No structure for $node');
122 } else { 118 } else {
123 return structure.dispatch(declVisitor, node, arg); 119 return structure.dispatch(declVisitor, node, arg);
124 } 120 }
125 }); 121 });
126 return null; 122 return null;
127 } 123 }
128 } 124 }
129 125
130 abstract class SemanticVisitor<R, A> extends Visitor<R> 126 abstract class SemanticVisitor<R, A> extends Visitor<R>
131 with SemanticSendResolvedMixin<R, A>, 127 with
132 SemanticDeclarationResolvedMixin<R, A>, 128 SemanticSendResolvedMixin<R, A>,
133 DeclarationResolverMixin { 129 SemanticDeclarationResolvedMixin<R, A>,
130 DeclarationResolverMixin {
134 TreeElements elements; 131 TreeElements elements;
135 132
136 SemanticVisitor(this.elements); 133 SemanticVisitor(this.elements);
137 } 134 }
138 135
139 // TODO(johnniwinther): Add visits for [visitLocalConstantGet], 136 // TODO(johnniwinther): Add visits for [visitLocalConstantGet],
140 // [visitLocalConstantInvoke], [visitStaticConstantGet], etc. 137 // [visitLocalConstantInvoke], [visitStaticConstantGet], etc.
141 abstract class SemanticSendVisitor<R, A> { 138 abstract class SemanticSendVisitor<R, A> {
142 R apply(Node node, A arg); 139 R apply(Node node, A arg);
143 140
144 /// Read of the [parameter]. 141 /// Read of the [parameter].
145 /// 142 ///
146 /// For instance: 143 /// For instance:
147 /// 144 ///
148 /// m(parameter) => parameter; 145 /// m(parameter) => parameter;
149 /// 146 ///
150 R visitParameterGet( 147 R visitParameterGet(Send node, ParameterElement parameter, A arg);
151 Send node,
152 ParameterElement parameter,
153 A arg);
154 148
155 /// Assignment of [rhs] to the [parameter]. 149 /// Assignment of [rhs] to the [parameter].
156 /// 150 ///
157 /// For instance: 151 /// For instance:
158 /// 152 ///
159 /// m(parameter) { 153 /// m(parameter) {
160 /// parameter = rhs; 154 /// parameter = rhs;
161 /// } 155 /// }
162 /// 156 ///
163 R visitParameterSet( 157 R visitParameterSet(
164 SendSet node, 158 SendSet node, ParameterElement parameter, Node rhs, A arg);
165 ParameterElement parameter,
166 Node rhs,
167 A arg);
168 159
169 /// Assignment of [rhs] to the final [parameter]. 160 /// Assignment of [rhs] to the final [parameter].
170 /// 161 ///
171 /// For instance: 162 /// For instance:
172 /// 163 ///
173 /// m(final parameter) { 164 /// m(final parameter) {
174 /// parameter = rhs; 165 /// parameter = rhs;
175 /// } 166 /// }
176 /// 167 ///
177 R visitFinalParameterSet( 168 R visitFinalParameterSet(
178 SendSet node, 169 SendSet node, ParameterElement parameter, Node rhs, A arg);
179 ParameterElement parameter,
180 Node rhs,
181 A arg);
182 170
183 /// Invocation of the [parameter] with [arguments]. 171 /// Invocation of the [parameter] with [arguments].
184 /// 172 ///
185 /// For instance: 173 /// For instance:
186 /// 174 ///
187 /// m(parameter) { 175 /// m(parameter) {
188 /// parameter(null, 42); 176 /// parameter(null, 42);
189 /// } 177 /// }
190 /// 178 ///
191 R visitParameterInvoke( 179 R visitParameterInvoke(Send node, ParameterElement parameter,
192 Send node, 180 NodeList arguments, CallStructure callStructure, A arg);
193 ParameterElement parameter,
194 NodeList arguments,
195 CallStructure callStructure,
196 A arg);
197 181
198 /// Read of the local [variable]. 182 /// Read of the local [variable].
199 /// 183 ///
200 /// For instance: 184 /// For instance:
201 /// 185 ///
202 /// m() { 186 /// m() {
203 /// var variable; 187 /// var variable;
204 /// return variable; 188 /// return variable;
205 /// } 189 /// }
206 /// 190 ///
207 R visitLocalVariableGet( 191 R visitLocalVariableGet(Send node, LocalVariableElement variable, A arg);
208 Send node,
209 LocalVariableElement variable,
210 A arg);
211 192
212 /// Assignment of [rhs] to the local [variable]. 193 /// Assignment of [rhs] to the local [variable].
213 /// 194 ///
214 /// For instance: 195 /// For instance:
215 /// 196 ///
216 /// m() { 197 /// m() {
217 /// var variable; 198 /// var variable;
218 /// variable = rhs; 199 /// variable = rhs;
219 /// } 200 /// }
220 /// 201 ///
221 R visitLocalVariableSet( 202 R visitLocalVariableSet(
222 SendSet node, 203 SendSet node, LocalVariableElement variable, Node rhs, A arg);
223 LocalVariableElement variable,
224 Node rhs,
225 A arg);
226 204
227 /// Assignment of [rhs] to the final local [variable]. 205 /// Assignment of [rhs] to the final local [variable].
228 /// 206 ///
229 /// For instance: 207 /// For instance:
230 /// 208 ///
231 /// m() { 209 /// m() {
232 /// final variable = null; 210 /// final variable = null;
233 /// variable = rhs; 211 /// variable = rhs;
234 /// } 212 /// }
235 /// 213 ///
236 R visitFinalLocalVariableSet( 214 R visitFinalLocalVariableSet(
237 SendSet node, 215 SendSet node, LocalVariableElement variable, Node rhs, A arg);
238 LocalVariableElement variable,
239 Node rhs,
240 A arg);
241 216
242 /// Invocation of the local variable [variable] with [arguments]. 217 /// Invocation of the local variable [variable] with [arguments].
243 /// 218 ///
244 /// For instance: 219 /// For instance:
245 /// 220 ///
246 /// m() { 221 /// m() {
247 /// var variable; 222 /// var variable;
248 /// variable(null, 42); 223 /// variable(null, 42);
249 /// } 224 /// }
250 /// 225 ///
251 R visitLocalVariableInvoke( 226 R visitLocalVariableInvoke(Send node, LocalVariableElement variable,
252 Send node, 227 NodeList arguments, CallStructure callStructure, A arg);
253 LocalVariableElement variable,
254 NodeList arguments,
255 CallStructure callStructure,
256 A arg);
257 228
258 /// Closurization of the local [function]. 229 /// Closurization of the local [function].
259 /// 230 ///
260 /// For instance: 231 /// For instance:
261 /// 232 ///
262 /// m() { 233 /// m() {
263 /// o(a, b) {} 234 /// o(a, b) {}
264 /// return o; 235 /// return o;
265 /// } 236 /// }
266 /// 237 ///
267 R visitLocalFunctionGet( 238 R visitLocalFunctionGet(Send node, LocalFunctionElement function, A arg);
268 Send node,
269 LocalFunctionElement function,
270 A arg);
271 239
272 /// Assignment of [rhs] to the local [function]. 240 /// Assignment of [rhs] to the local [function].
273 /// 241 ///
274 /// For instance: 242 /// For instance:
275 /// 243 ///
276 /// m() { 244 /// m() {
277 /// o(a, b) {} 245 /// o(a, b) {}
278 /// o = rhs; 246 /// o = rhs;
279 /// } 247 /// }
280 /// 248 ///
281 R visitLocalFunctionSet( 249 R visitLocalFunctionSet(
282 SendSet node, 250 SendSet node, LocalFunctionElement function, Node rhs, A arg);
283 LocalFunctionElement function,
284 Node rhs,
285 A arg);
286 251
287 /// Invocation of the local [function] with [arguments]. 252 /// Invocation of the local [function] with [arguments].
288 /// 253 ///
289 /// For instance: 254 /// For instance:
290 /// 255 ///
291 /// m() { 256 /// m() {
292 /// o(a, b) {} 257 /// o(a, b) {}
293 /// return o(null, 42); 258 /// return o(null, 42);
294 /// } 259 /// }
295 /// 260 ///
296 R visitLocalFunctionInvoke( 261 R visitLocalFunctionInvoke(Send node, LocalFunctionElement function,
297 Send node, 262 NodeList arguments, CallStructure callStructure, A arg);
298 LocalFunctionElement function,
299 NodeList arguments,
300 CallStructure callStructure,
301 A arg);
302 263
303 /// Invocation of the local [function] with incompatible [arguments]. 264 /// Invocation of the local [function] with incompatible [arguments].
304 /// 265 ///
305 /// For instance: 266 /// For instance:
306 /// 267 ///
307 /// m() { 268 /// m() {
308 /// o(a) {} 269 /// o(a) {}
309 /// return o(null, 42); 270 /// return o(null, 42);
310 /// } 271 /// }
311 /// 272 ///
312 R visitLocalFunctionIncompatibleInvoke( 273 R visitLocalFunctionIncompatibleInvoke(
313 Send node, 274 Send node,
314 LocalFunctionElement function, 275 LocalFunctionElement function,
315 NodeList arguments, 276 NodeList arguments,
316 CallStructure callStructure, 277 CallStructure callStructure,
317 A arg); 278 A arg);
318 279
319 /// Getter call on [receiver] of the property defined by [selector]. 280 /// Getter call on [receiver] of the property defined by [selector].
320 /// 281 ///
321 /// For instance: 282 /// For instance:
322 /// 283 ///
323 /// m(receiver) => receiver.foo; 284 /// m(receiver) => receiver.foo;
324 /// 285 ///
325 R visitDynamicPropertyGet( 286 R visitDynamicPropertyGet(Send node, Node receiver, Name name, A arg);
326 Send node,
327 Node receiver,
328 Name name,
329 A arg);
330 287
331 /// Conditional (if not null) getter call on [receiver] of the property 288 /// Conditional (if not null) getter call on [receiver] of the property
332 /// defined by [selector]. 289 /// defined by [selector].
333 /// 290 ///
334 /// For instance: 291 /// For instance:
335 /// 292 ///
336 /// m(receiver) => receiver?.foo; 293 /// m(receiver) => receiver?.foo;
337 /// 294 ///
338 R visitIfNotNullDynamicPropertyGet( 295 R visitIfNotNullDynamicPropertyGet(
339 Send node, 296 Send node, Node receiver, Name name, A arg);
340 Node receiver,
341 Name name,
342 A arg);
343 297
344 /// Setter call on [receiver] with argument [rhs] of the property defined by 298 /// Setter call on [receiver] with argument [rhs] of the property defined by
345 /// [selector]. 299 /// [selector].
346 /// 300 ///
347 /// For instance: 301 /// For instance:
348 /// 302 ///
349 /// m(receiver) { 303 /// m(receiver) {
350 /// receiver.foo = rhs; 304 /// receiver.foo = rhs;
351 /// } 305 /// }
352 /// 306 ///
353 R visitDynamicPropertySet( 307 R visitDynamicPropertySet(
354 SendSet node, 308 SendSet node, Node receiver, Name name, Node rhs, A arg);
355 Node receiver,
356 Name name,
357 Node rhs,
358 A arg);
359 309
360 /// Conditional (if not null) setter call on [receiver] with argument [rhs] of 310 /// Conditional (if not null) setter call on [receiver] with argument [rhs] of
361 /// the property defined by [selector]. 311 /// the property defined by [selector].
362 /// 312 ///
363 /// For instance: 313 /// For instance:
364 /// 314 ///
365 /// m(receiver) { 315 /// m(receiver) {
366 /// receiver?.foo = rhs; 316 /// receiver?.foo = rhs;
367 /// } 317 /// }
368 /// 318 ///
369 R visitIfNotNullDynamicPropertySet( 319 R visitIfNotNullDynamicPropertySet(
370 SendSet node, 320 SendSet node, Node receiver, Name name, Node rhs, A arg);
371 Node receiver,
372 Name name,
373 Node rhs,
374 A arg);
375 321
376 /// Invocation of the property defined by [selector] on [receiver] with 322 /// Invocation of the property defined by [selector] on [receiver] with
377 /// [arguments]. 323 /// [arguments].
378 /// 324 ///
379 /// For instance: 325 /// For instance:
380 /// 326 ///
381 /// m(receiver) { 327 /// m(receiver) {
382 /// receiver.foo(null, 42); 328 /// receiver.foo(null, 42);
383 /// } 329 /// }
384 /// 330 ///
385 R visitDynamicPropertyInvoke( 331 R visitDynamicPropertyInvoke(
386 Send node, 332 Send node, Node receiver, NodeList arguments, Selector selector, A arg);
387 Node receiver,
388 NodeList arguments,
389 Selector selector,
390 A arg);
391 333
392 /// Conditinal invocation of the property defined by [selector] on [receiver] 334 /// Conditinal invocation of the property defined by [selector] on [receiver]
393 /// with [arguments], if [receiver] is not null. 335 /// with [arguments], if [receiver] is not null.
394 /// 336 ///
395 /// For instance: 337 /// For instance:
396 /// 338 ///
397 /// m(receiver) { 339 /// m(receiver) {
398 /// receiver?.foo(null, 42); 340 /// receiver?.foo(null, 42);
399 /// } 341 /// }
400 /// 342 ///
401 R visitIfNotNullDynamicPropertyInvoke( 343 R visitIfNotNullDynamicPropertyInvoke(
402 Send node, 344 Send node, Node receiver, NodeList arguments, Selector selector, A arg);
403 Node receiver,
404 NodeList arguments,
405 Selector selector,
406 A arg);
407 345
408 /// Getter call on `this` of the property defined by [selector]. 346 /// Getter call on `this` of the property defined by [selector].
409 /// 347 ///
410 /// For instance: 348 /// For instance:
411 /// 349 ///
412 /// class C { 350 /// class C {
413 /// m() => this.foo; 351 /// m() => this.foo;
414 /// } 352 /// }
415 /// 353 ///
416 /// or 354 /// or
417 /// 355 ///
418 /// class C { 356 /// class C {
419 /// m() => foo; 357 /// m() => foo;
420 /// } 358 /// }
421 /// 359 ///
422 R visitThisPropertyGet( 360 R visitThisPropertyGet(Send node, Name name, A arg);
423 Send node,
424 Name name,
425 A arg);
426 361
427 /// Setter call on `this` with argument [rhs] of the property defined by 362 /// Setter call on `this` with argument [rhs] of the property defined by
428 /// [selector]. 363 /// [selector].
429 /// 364 ///
430 /// For instance: 365 /// For instance:
431 /// 366 ///
432 /// class C { 367 /// class C {
433 /// m() { this.foo = rhs; } 368 /// m() { this.foo = rhs; }
434 /// } 369 /// }
435 /// 370 ///
436 /// or 371 /// or
437 /// 372 ///
438 /// class C { 373 /// class C {
439 /// m() { foo = rhs; } 374 /// m() { foo = rhs; }
440 /// } 375 /// }
441 /// 376 ///
442 R visitThisPropertySet( 377 R visitThisPropertySet(SendSet node, Name name, Node rhs, A arg);
443 SendSet node,
444 Name name,
445 Node rhs,
446 A arg);
447 378
448 /// Invocation of the property defined by [selector] on `this` with 379 /// Invocation of the property defined by [selector] on `this` with
449 /// [arguments]. 380 /// [arguments].
450 /// 381 ///
451 /// For instance: 382 /// For instance:
452 /// 383 ///
453 /// class C { 384 /// class C {
454 /// m() { this.foo(null, 42); } 385 /// m() { this.foo(null, 42); }
455 /// } 386 /// }
456 /// 387 ///
457 /// or 388 /// or
458 /// 389 ///
459 /// class C { 390 /// class C {
460 /// m() { foo(null, 42); } 391 /// m() { foo(null, 42); }
461 /// } 392 /// }
462 /// 393 ///
463 /// 394 ///
464 R visitThisPropertyInvoke( 395 R visitThisPropertyInvoke(
465 Send node, 396 Send node, NodeList arguments, Selector selector, A arg);
466 NodeList arguments,
467 Selector selector,
468 A arg);
469 397
470 /// Read of `this`. 398 /// Read of `this`.
471 /// 399 ///
472 /// For instance: 400 /// For instance:
473 /// 401 ///
474 /// class C { 402 /// class C {
475 /// m() => this; 403 /// m() => this;
476 /// } 404 /// }
477 /// 405 ///
478 R visitThisGet( 406 R visitThisGet(Identifier node, A arg);
479 Identifier node,
480 A arg);
481 407
482 /// Invocation of `this` with [arguments]. 408 /// Invocation of `this` with [arguments].
483 /// 409 ///
484 /// For instance: 410 /// For instance:
485 /// 411 ///
486 /// class C { 412 /// class C {
487 /// m() => this(null, 42); 413 /// m() => this(null, 42);
488 /// } 414 /// }
489 /// 415 ///
490 R visitThisInvoke( 416 R visitThisInvoke(
491 Send node, 417 Send node, NodeList arguments, CallStructure callStructure, A arg);
492 NodeList arguments,
493 CallStructure callStructure,
494 A arg);
495
496 418
497 /// Read of the super [field]. 419 /// Read of the super [field].
498 /// 420 ///
499 /// For instance: 421 /// For instance:
500 /// 422 ///
501 /// class B { 423 /// class B {
502 /// var foo; 424 /// var foo;
503 /// } 425 /// }
504 /// class C extends B { 426 /// class C extends B {
505 /// m() => super.foo; 427 /// m() => super.foo;
506 /// } 428 /// }
507 /// 429 ///
508 R visitSuperFieldGet( 430 R visitSuperFieldGet(Send node, FieldElement field, A arg);
509 Send node,
510 FieldElement field,
511 A arg);
512 431
513 /// Assignment of [rhs] to the super [field]. 432 /// Assignment of [rhs] to the super [field].
514 /// 433 ///
515 /// For instance: 434 /// For instance:
516 /// 435 ///
517 /// class B { 436 /// class B {
518 /// var foo; 437 /// var foo;
519 /// } 438 /// }
520 /// class C extends B { 439 /// class C extends B {
521 /// m() { super.foo = rhs; } 440 /// m() { super.foo = rhs; }
522 /// } 441 /// }
523 /// 442 ///
524 R visitSuperFieldSet( 443 R visitSuperFieldSet(SendSet node, FieldElement field, Node rhs, A arg);
525 SendSet node,
526 FieldElement field,
527 Node rhs,
528 A arg);
529 444
530 /// Assignment of [rhs] to the final static [field]. 445 /// Assignment of [rhs] to the final static [field].
531 /// 446 ///
532 /// For instance: 447 /// For instance:
533 /// 448 ///
534 /// class B { 449 /// class B {
535 /// final foo = null; 450 /// final foo = null;
536 /// } 451 /// }
537 /// class C extends B { 452 /// class C extends B {
538 /// m() { super.foo = rhs; } 453 /// m() { super.foo = rhs; }
539 /// } 454 /// }
540 /// 455 ///
541 R visitFinalSuperFieldSet( 456 R visitFinalSuperFieldSet(SendSet node, FieldElement field, Node rhs, A arg);
542 SendSet node,
543 FieldElement field,
544 Node rhs,
545 A arg);
546 457
547 /// Invocation of the super [field] with [arguments]. 458 /// Invocation of the super [field] with [arguments].
548 /// 459 ///
549 /// For instance: 460 /// For instance:
550 /// 461 ///
551 /// class B { 462 /// class B {
552 /// var foo; 463 /// var foo;
553 /// } 464 /// }
554 /// class C extends B { 465 /// class C extends B {
555 /// m() { super.foo(null, 42); } 466 /// m() { super.foo(null, 42); }
556 /// } 467 /// }
557 /// 468 ///
558 R visitSuperFieldInvoke( 469 R visitSuperFieldInvoke(Send node, FieldElement field, NodeList arguments,
559 Send node, 470 CallStructure callStructure, A arg);
560 FieldElement field,
561 NodeList arguments,
562 CallStructure callStructure,
563 A arg);
564 471
565 /// Closurization of the super [method]. 472 /// Closurization of the super [method].
566 /// 473 ///
567 /// For instance: 474 /// For instance:
568 /// 475 ///
569 /// class B { 476 /// class B {
570 /// foo(a, b) {} 477 /// foo(a, b) {}
571 /// } 478 /// }
572 /// class C extends B { 479 /// class C extends B {
573 /// m() => super.foo; 480 /// m() => super.foo;
574 /// } 481 /// }
575 /// 482 ///
576 R visitSuperMethodGet( 483 R visitSuperMethodGet(Send node, MethodElement method, A arg);
577 Send node,
578 MethodElement method,
579 A arg);
580 484
581 /// Invocation of the super [method] with [arguments]. 485 /// Invocation of the super [method] with [arguments].
582 /// 486 ///
583 /// For instance: 487 /// For instance:
584 /// 488 ///
585 /// class B { 489 /// class B {
586 /// foo(a, b) {} 490 /// foo(a, b) {}
587 /// } 491 /// }
588 /// class C extends B { 492 /// class C extends B {
589 /// m() { super.foo(null, 42); } 493 /// m() { super.foo(null, 42); }
590 /// } 494 /// }
591 /// 495 ///
592 R visitSuperMethodInvoke( 496 R visitSuperMethodInvoke(Send node, MethodElement method, NodeList arguments,
593 Send node, 497 CallStructure callStructure, A arg);
594 MethodElement method,
595 NodeList arguments,
596 CallStructure callStructure,
597 A arg);
598 498
599 /// Invocation of the super [method] with incompatible [arguments]. 499 /// Invocation of the super [method] with incompatible [arguments].
600 /// 500 ///
601 /// For instance: 501 /// For instance:
602 /// 502 ///
603 /// class B { 503 /// class B {
604 /// foo(a, b) {} 504 /// foo(a, b) {}
605 /// } 505 /// }
606 /// class C extends B { 506 /// class C extends B {
607 /// m() { super.foo(null); } // One argument missing. 507 /// m() { super.foo(null); } // One argument missing.
608 /// } 508 /// }
609 /// 509 ///
610 R visitSuperMethodIncompatibleInvoke( 510 R visitSuperMethodIncompatibleInvoke(Send node, MethodElement method,
611 Send node, 511 NodeList arguments, CallStructure callStructure, A arg);
612 MethodElement method,
613 NodeList arguments,
614 CallStructure callStructure,
615 A arg);
616 512
617 /// Assignment of [rhs] to the super [method]. 513 /// Assignment of [rhs] to the super [method].
618 /// 514 ///
619 /// For instance: 515 /// For instance:
620 /// 516 ///
621 /// class B { 517 /// class B {
622 /// foo(a, b) {} 518 /// foo(a, b) {}
623 /// } 519 /// }
624 /// class C extends B { 520 /// class C extends B {
625 /// m() { super.foo = rhs; } 521 /// m() { super.foo = rhs; }
626 /// } 522 /// }
627 /// 523 ///
628 R visitSuperMethodSet( 524 R visitSuperMethodSet(Send node, MethodElement method, Node rhs, A arg);
629 Send node,
630 MethodElement method,
631 Node rhs,
632 A arg);
633 525
634 /// Getter call to the super [getter]. 526 /// Getter call to the super [getter].
635 /// 527 ///
636 /// For instance: 528 /// For instance:
637 /// 529 ///
638 /// class B { 530 /// class B {
639 /// get foo => null; 531 /// get foo => null;
640 /// } 532 /// }
641 /// class C extends B { 533 /// class C extends B {
642 /// m() => super.foo; 534 /// m() => super.foo;
643 /// } 535 /// }
644 /// 536 ///
645 R visitSuperGetterGet( 537 R visitSuperGetterGet(Send node, FunctionElement getter, A arg);
646 Send node,
647 FunctionElement getter,
648 A arg);
649 538
650 /// Getter call the super [setter]. 539 /// Getter call the super [setter].
651 /// 540 ///
652 /// For instance: 541 /// For instance:
653 /// 542 ///
654 /// class B { 543 /// class B {
655 /// set foo(_) {} 544 /// set foo(_) {}
656 /// } 545 /// }
657 /// class C extends B { 546 /// class C extends B {
658 /// m() => super.foo; 547 /// m() => super.foo;
659 /// } 548 /// }
660 /// 549 ///
661 R visitSuperSetterGet( 550 R visitSuperSetterGet(Send node, FunctionElement setter, A arg);
662 Send node,
663 FunctionElement setter,
664 A arg);
665 551
666 /// Setter call to the super [setter]. 552 /// Setter call to the super [setter].
667 /// 553 ///
668 /// For instance: 554 /// For instance:
669 /// 555 ///
670 /// class B { 556 /// class B {
671 /// set foo(_) {} 557 /// set foo(_) {}
672 /// } 558 /// }
673 /// class C extends B { 559 /// class C extends B {
674 /// m() { super.foo = rhs; } 560 /// m() { super.foo = rhs; }
675 /// } 561 /// }
676 /// 562 ///
677 R visitSuperSetterSet( 563 R visitSuperSetterSet(SendSet node, FunctionElement setter, Node rhs, A arg);
678 SendSet node,
679 FunctionElement setter,
680 Node rhs,
681 A arg);
682 564
683 /// Assignment of [rhs] to the super [getter]. 565 /// Assignment of [rhs] to the super [getter].
684 /// 566 ///
685 /// For instance: 567 /// For instance:
686 /// 568 ///
687 /// class B { 569 /// class B {
688 /// get foo => null; 570 /// get foo => null;
689 /// } 571 /// }
690 /// class C extends B { 572 /// class C extends B {
691 /// m() { super.foo = rhs; } 573 /// m() { super.foo = rhs; }
692 /// } 574 /// }
693 /// 575 ///
694 R visitSuperGetterSet( 576 R visitSuperGetterSet(SendSet node, FunctionElement getter, Node rhs, A arg);
695 SendSet node,
696 FunctionElement getter,
697 Node rhs,
698 A arg);
699 577
700 /// Invocation of the super [getter] with [arguments]. 578 /// Invocation of the super [getter] with [arguments].
701 /// 579 ///
702 /// For instance: 580 /// For instance:
703 /// 581 ///
704 /// class B { 582 /// class B {
705 /// get foo => null; 583 /// get foo => null;
706 /// } 584 /// }
707 /// class C extends B { 585 /// class C extends B {
708 /// m() { super.foo(null, 42; } 586 /// m() { super.foo(null, 42; }
709 /// } 587 /// }
710 /// 588 ///
711 R visitSuperGetterInvoke( 589 R visitSuperGetterInvoke(Send node, FunctionElement getter,
712 Send node, 590 NodeList arguments, CallStructure callStructure, A arg);
713 FunctionElement getter,
714 NodeList arguments,
715 CallStructure callStructure,
716 A arg);
717 591
718 /// Invocation of the super [setter] with [arguments]. 592 /// Invocation of the super [setter] with [arguments].
719 /// 593 ///
720 /// For instance: 594 /// For instance:
721 /// 595 ///
722 /// class B { 596 /// class B {
723 /// set foo(_) {} 597 /// set foo(_) {}
724 /// } 598 /// }
725 /// class C extends B { 599 /// class C extends B {
726 /// m() { super.foo(null, 42; } 600 /// m() { super.foo(null, 42; }
727 /// } 601 /// }
728 /// 602 ///
729 R visitSuperSetterInvoke( 603 R visitSuperSetterInvoke(Send node, FunctionElement setter,
730 Send node, 604 NodeList arguments, CallStructure callStructure, A arg);
731 FunctionElement setter,
732 NodeList arguments,
733 CallStructure callStructure,
734 A arg);
735 605
736 /// Invocation of a [expression] with [arguments]. 606 /// Invocation of a [expression] with [arguments].
737 /// 607 ///
738 /// For instance: 608 /// For instance:
739 /// 609 ///
740 /// m() => (a, b){}(null, 42); 610 /// m() => (a, b){}(null, 42);
741 /// 611 ///
742 R visitExpressionInvoke( 612 R visitExpressionInvoke(Send node, Node expression, NodeList arguments,
743 Send node, 613 CallStructure callStructure, A arg);
744 Node expression,
745 NodeList arguments,
746 CallStructure callStructure,
747 A arg);
748 614
749 /// Read of the static [field]. 615 /// Read of the static [field].
750 /// 616 ///
751 /// For instance: 617 /// For instance:
752 /// 618 ///
753 /// class C { 619 /// class C {
754 /// static var foo; 620 /// static var foo;
755 /// } 621 /// }
756 /// m() => C.foo; 622 /// m() => C.foo;
757 /// 623 ///
758 R visitStaticFieldGet( 624 R visitStaticFieldGet(Send node, FieldElement field, A arg);
759 Send node,
760 FieldElement field,
761 A arg);
762 625
763 /// Assignment of [rhs] to the static [field]. 626 /// Assignment of [rhs] to the static [field].
764 /// 627 ///
765 /// For instance: 628 /// For instance:
766 /// 629 ///
767 /// class C { 630 /// class C {
768 /// static var foo; 631 /// static var foo;
769 /// } 632 /// }
770 /// m() { C.foo = rhs; } 633 /// m() { C.foo = rhs; }
771 /// 634 ///
772 R visitStaticFieldSet( 635 R visitStaticFieldSet(SendSet node, FieldElement field, Node rhs, A arg);
773 SendSet node,
774 FieldElement field,
775 Node rhs,
776 A arg);
777 636
778 /// Assignment of [rhs] to the final static [field]. 637 /// Assignment of [rhs] to the final static [field].
779 /// 638 ///
780 /// For instance: 639 /// For instance:
781 /// 640 ///
782 /// class C { 641 /// class C {
783 /// static final foo; 642 /// static final foo;
784 /// } 643 /// }
785 /// m() { C.foo = rhs; } 644 /// m() { C.foo = rhs; }
786 /// 645 ///
787 R visitFinalStaticFieldSet( 646 R visitFinalStaticFieldSet(SendSet node, FieldElement field, Node rhs, A arg);
788 SendSet node,
789 FieldElement field,
790 Node rhs,
791 A arg);
792 647
793 /// Invocation of the static [field] with [arguments]. 648 /// Invocation of the static [field] with [arguments].
794 /// 649 ///
795 /// For instance: 650 /// For instance:
796 /// 651 ///
797 /// class C { 652 /// class C {
798 /// static var foo; 653 /// static var foo;
799 /// } 654 /// }
800 /// m() { C.foo(null, 42); } 655 /// m() { C.foo(null, 42); }
801 /// 656 ///
802 R visitStaticFieldInvoke( 657 R visitStaticFieldInvoke(Send node, FieldElement field, NodeList arguments,
803 Send node, 658 CallStructure callStructure, A arg);
804 FieldElement field,
805 NodeList arguments,
806 CallStructure callStructure,
807 A arg);
808 659
809 /// Closurization of the static [function]. 660 /// Closurization of the static [function].
810 /// 661 ///
811 /// For instance: 662 /// For instance:
812 /// 663 ///
813 /// class C { 664 /// class C {
814 /// static foo(a, b) {} 665 /// static foo(a, b) {}
815 /// } 666 /// }
816 /// m() => C.foo; 667 /// m() => C.foo;
817 /// 668 ///
818 R visitStaticFunctionGet( 669 R visitStaticFunctionGet(Send node, MethodElement function, A arg);
819 Send node,
820 MethodElement function,
821 A arg);
822 670
823 /// Invocation of the static [function] with [arguments]. 671 /// Invocation of the static [function] with [arguments].
824 /// 672 ///
825 /// For instance: 673 /// For instance:
826 /// 674 ///
827 /// class C { 675 /// class C {
828 /// static foo(a, b) {} 676 /// static foo(a, b) {}
829 /// } 677 /// }
830 /// m() { C.foo(null, 42); } 678 /// m() { C.foo(null, 42); }
831 /// 679 ///
832 R visitStaticFunctionInvoke( 680 R visitStaticFunctionInvoke(Send node, MethodElement function,
833 Send node, 681 NodeList arguments, CallStructure callStructure, A arg);
834 MethodElement function,
835 NodeList arguments,
836 CallStructure callStructure,
837 A arg);
838 682
839 /// Invocation of the static [function] with incompatible [arguments]. 683 /// Invocation of the static [function] with incompatible [arguments].
840 /// 684 ///
841 /// For instance: 685 /// For instance:
842 /// 686 ///
843 /// class C { 687 /// class C {
844 /// static foo(a, b) {} 688 /// static foo(a, b) {}
845 /// } 689 /// }
846 /// m() { C.foo(null); } 690 /// m() { C.foo(null); }
847 /// 691 ///
848 R visitStaticFunctionIncompatibleInvoke( 692 R visitStaticFunctionIncompatibleInvoke(Send node, MethodElement function,
849 Send node, 693 NodeList arguments, CallStructure callStructure, A arg);
850 MethodElement function,
851 NodeList arguments,
852 CallStructure callStructure,
853 A arg);
854 694
855 /// Assignment of [rhs] to the static [function]. 695 /// Assignment of [rhs] to the static [function].
856 /// 696 ///
857 /// For instance: 697 /// For instance:
858 /// 698 ///
859 /// class C { 699 /// class C {
860 /// static foo(a, b) {} 700 /// static foo(a, b) {}
861 /// } 701 /// }
862 /// m() { C.foo = rhs; } 702 /// m() { C.foo = rhs; }
863 /// 703 ///
864 R visitStaticFunctionSet( 704 R visitStaticFunctionSet(Send node, MethodElement function, Node rhs, A arg);
865 Send node,
866 MethodElement function,
867 Node rhs,
868 A arg);
869 705
870 /// Getter call to the static [getter]. 706 /// Getter call to the static [getter].
871 /// 707 ///
872 /// For instance: 708 /// For instance:
873 /// 709 ///
874 /// class C { 710 /// class C {
875 /// static get foo => null; 711 /// static get foo => null;
876 /// } 712 /// }
877 /// m() => C.foo; 713 /// m() => C.foo;
878 /// 714 ///
879 R visitStaticGetterGet( 715 R visitStaticGetterGet(Send node, FunctionElement getter, A arg);
880 Send node,
881 FunctionElement getter,
882 A arg);
883 716
884 /// Getter call the static [setter]. 717 /// Getter call the static [setter].
885 /// 718 ///
886 /// For instance: 719 /// For instance:
887 /// 720 ///
888 /// class C { 721 /// class C {
889 /// static set foo(_) {} 722 /// static set foo(_) {}
890 /// } 723 /// }
891 /// m() => C.foo; 724 /// m() => C.foo;
892 /// 725 ///
893 R visitStaticSetterGet( 726 R visitStaticSetterGet(Send node, FunctionElement setter, A arg);
894 Send node,
895 FunctionElement setter,
896 A arg);
897 727
898 /// Setter call to the static [setter]. 728 /// Setter call to the static [setter].
899 /// 729 ///
900 /// For instance: 730 /// For instance:
901 /// 731 ///
902 /// class C { 732 /// class C {
903 /// static set foo(_) {} 733 /// static set foo(_) {}
904 /// } 734 /// }
905 /// m() { C.foo = rhs; } 735 /// m() { C.foo = rhs; }
906 /// 736 ///
907 R visitStaticSetterSet( 737 R visitStaticSetterSet(SendSet node, FunctionElement setter, Node rhs, A arg);
908 SendSet node,
909 FunctionElement setter,
910 Node rhs,
911 A arg);
912 738
913 /// Assignment of [rhs] to the static [getter]. 739 /// Assignment of [rhs] to the static [getter].
914 /// 740 ///
915 /// For instance: 741 /// For instance:
916 /// 742 ///
917 /// class C { 743 /// class C {
918 /// static get foo => null; 744 /// static get foo => null;
919 /// } 745 /// }
920 /// m() { C.foo = rhs; } 746 /// m() { C.foo = rhs; }
921 /// 747 ///
922 R visitStaticGetterSet( 748 R visitStaticGetterSet(SendSet node, FunctionElement getter, Node rhs, A arg);
923 SendSet node,
924 FunctionElement getter,
925 Node rhs,
926 A arg);
927 749
928 /// Invocation of the static [getter] with [arguments]. 750 /// Invocation of the static [getter] with [arguments].
929 /// 751 ///
930 /// For instance: 752 /// For instance:
931 /// 753 ///
932 /// class C { 754 /// class C {
933 /// static get foo => null; 755 /// static get foo => null;
934 /// } 756 /// }
935 /// m() { C.foo(null, 42; } 757 /// m() { C.foo(null, 42; }
936 /// 758 ///
937 R visitStaticGetterInvoke( 759 R visitStaticGetterInvoke(Send node, FunctionElement getter,
938 Send node, 760 NodeList arguments, CallStructure callStructure, A arg);
939 FunctionElement getter,
940 NodeList arguments,
941 CallStructure callStructure,
942 A arg);
943 761
944 /// Invocation of the static [setter] with [arguments]. 762 /// Invocation of the static [setter] with [arguments].
945 /// 763 ///
946 /// For instance: 764 /// For instance:
947 /// 765 ///
948 /// class C { 766 /// class C {
949 /// static set foo(_) {} 767 /// static set foo(_) {}
950 /// } 768 /// }
951 /// m() { C.foo(null, 42; } 769 /// m() { C.foo(null, 42; }
952 /// 770 ///
953 R visitStaticSetterInvoke( 771 R visitStaticSetterInvoke(Send node, FunctionElement setter,
954 Send node, 772 NodeList arguments, CallStructure callStructure, A arg);
955 FunctionElement setter,
956 NodeList arguments,
957 CallStructure callStructure,
958 A arg);
959 773
960 /// Read of the top level [field]. 774 /// Read of the top level [field].
961 /// 775 ///
962 /// For instance: 776 /// For instance:
963 /// 777 ///
964 /// var foo; 778 /// var foo;
965 /// m() => foo; 779 /// m() => foo;
966 /// 780 ///
967 R visitTopLevelFieldGet( 781 R visitTopLevelFieldGet(Send node, FieldElement field, A arg);
968 Send node,
969 FieldElement field,
970 A arg);
971 782
972 /// Assignment of [rhs] to the top level [field]. 783 /// Assignment of [rhs] to the top level [field].
973 /// 784 ///
974 /// For instance: 785 /// For instance:
975 /// 786 ///
976 /// var foo; 787 /// var foo;
977 /// m() { foo = rhs; } 788 /// m() { foo = rhs; }
978 /// 789 ///
979 R visitTopLevelFieldSet( 790 R visitTopLevelFieldSet(SendSet node, FieldElement field, Node rhs, A arg);
980 SendSet node,
981 FieldElement field,
982 Node rhs,
983 A arg);
984 791
985 /// Assignment of [rhs] to the final top level [field]. 792 /// Assignment of [rhs] to the final top level [field].
986 /// 793 ///
987 /// For instance: 794 /// For instance:
988 /// 795 ///
989 /// final foo = null; 796 /// final foo = null;
990 /// m() { foo = rhs; } 797 /// m() { foo = rhs; }
991 /// 798 ///
992 R visitFinalTopLevelFieldSet( 799 R visitFinalTopLevelFieldSet(
993 SendSet node, 800 SendSet node, FieldElement field, Node rhs, A arg);
994 FieldElement field,
995 Node rhs,
996 A arg);
997 801
998 /// Invocation of the top level [field] with [arguments]. 802 /// Invocation of the top level [field] with [arguments].
999 /// 803 ///
1000 /// For instance: 804 /// For instance:
1001 /// 805 ///
1002 /// var foo; 806 /// var foo;
1003 /// m() { foo(null, 42); } 807 /// m() { foo(null, 42); }
1004 /// 808 ///
1005 R visitTopLevelFieldInvoke( 809 R visitTopLevelFieldInvoke(Send node, FieldElement field, NodeList arguments,
1006 Send node, 810 CallStructure callStructure, A arg);
1007 FieldElement field,
1008 NodeList arguments,
1009 CallStructure callStructure,
1010 A arg);
1011 811
1012 /// Closurization of the top level [function]. 812 /// Closurization of the top level [function].
1013 /// 813 ///
1014 /// For instance: 814 /// For instance:
1015 /// 815 ///
1016 /// foo(a, b) {}; 816 /// foo(a, b) {};
1017 /// m() => foo; 817 /// m() => foo;
1018 /// 818 ///
1019 R visitTopLevelFunctionGet( 819 R visitTopLevelFunctionGet(Send node, MethodElement function, A arg);
1020 Send node,
1021 MethodElement function,
1022 A arg);
1023 820
1024 /// Invocation of the top level [function] with [arguments]. 821 /// Invocation of the top level [function] with [arguments].
1025 /// 822 ///
1026 /// For instance: 823 /// For instance:
1027 /// 824 ///
1028 /// foo(a, b) {}; 825 /// foo(a, b) {};
1029 /// m() { foo(null, 42); } 826 /// m() { foo(null, 42); }
1030 /// 827 ///
1031 R visitTopLevelFunctionInvoke( 828 R visitTopLevelFunctionInvoke(Send node, MethodElement function,
1032 Send node, 829 NodeList arguments, CallStructure callStructure, A arg);
1033 MethodElement function,
1034 NodeList arguments,
1035 CallStructure callStructure,
1036 A arg);
1037 830
1038 /// Invocation of the top level [function] with incompatible [arguments]. 831 /// Invocation of the top level [function] with incompatible [arguments].
1039 /// 832 ///
1040 /// For instance: 833 /// For instance:
1041 /// 834 ///
1042 /// class C { 835 /// class C {
1043 /// static foo(a, b) {} 836 /// static foo(a, b) {}
1044 /// } 837 /// }
1045 /// m() { C.foo(null); } 838 /// m() { C.foo(null); }
1046 /// 839 ///
1047 R visitTopLevelFunctionIncompatibleInvoke( 840 R visitTopLevelFunctionIncompatibleInvoke(Send node, MethodElement function,
1048 Send node, 841 NodeList arguments, CallStructure callStructure, A arg);
1049 MethodElement function,
1050 NodeList arguments,
1051 CallStructure callStructure,
1052 A arg);
1053 842
1054 /// Assignment of [rhs] to the top level [function]. 843 /// Assignment of [rhs] to the top level [function].
1055 /// 844 ///
1056 /// For instance: 845 /// For instance:
1057 /// 846 ///
1058 /// foo(a, b) {}; 847 /// foo(a, b) {};
1059 /// m() { foo = rhs; } 848 /// m() { foo = rhs; }
1060 /// 849 ///
1061 R visitTopLevelFunctionSet( 850 R visitTopLevelFunctionSet(
1062 Send node, 851 Send node, MethodElement function, Node rhs, A arg);
1063 MethodElement function,
1064 Node rhs,
1065 A arg);
1066 852
1067 /// Getter call to the top level [getter]. 853 /// Getter call to the top level [getter].
1068 /// 854 ///
1069 /// For instance: 855 /// For instance:
1070 /// 856 ///
1071 /// get foo => null; 857 /// get foo => null;
1072 /// m() => foo; 858 /// m() => foo;
1073 /// 859 ///
1074 R visitTopLevelGetterGet( 860 R visitTopLevelGetterGet(Send node, FunctionElement getter, A arg);
1075 Send node,
1076 FunctionElement getter,
1077 A arg);
1078 861
1079 /// Getter call the top level [setter]. 862 /// Getter call the top level [setter].
1080 /// 863 ///
1081 /// For instance: 864 /// For instance:
1082 /// 865 ///
1083 /// set foo(_) {} 866 /// set foo(_) {}
1084 /// m() => foo; 867 /// m() => foo;
1085 /// 868 ///
1086 R visitTopLevelSetterGet( 869 R visitTopLevelSetterGet(Send node, FunctionElement setter, A arg);
1087 Send node,
1088 FunctionElement setter,
1089 A arg);
1090 870
1091 /// Setter call to the top level [setter]. 871 /// Setter call to the top level [setter].
1092 /// 872 ///
1093 /// For instance: 873 /// For instance:
1094 /// 874 ///
1095 /// set foo(_) {} 875 /// set foo(_) {}
1096 /// m() { foo = rhs; } 876 /// m() { foo = rhs; }
1097 /// 877 ///
1098 R visitTopLevelSetterSet( 878 R visitTopLevelSetterSet(
1099 SendSet node, 879 SendSet node, FunctionElement setter, Node rhs, A arg);
1100 FunctionElement setter,
1101 Node rhs,
1102 A arg);
1103 880
1104 /// Assignment of [rhs] to the top level [getter]. 881 /// Assignment of [rhs] to the top level [getter].
1105 /// 882 ///
1106 /// For instance: 883 /// For instance:
1107 /// 884 ///
1108 /// get foo => null; 885 /// get foo => null;
1109 /// m() { foo = rhs; } 886 /// m() { foo = rhs; }
1110 /// 887 ///
1111 R visitTopLevelGetterSet( 888 R visitTopLevelGetterSet(
1112 SendSet node, 889 SendSet node, FunctionElement getter, Node rhs, A arg);
1113 FunctionElement getter,
1114 Node rhs,
1115 A arg);
1116 890
1117 /// Invocation of the top level [getter] with [arguments]. 891 /// Invocation of the top level [getter] with [arguments].
1118 /// 892 ///
1119 /// For instance: 893 /// For instance:
1120 /// 894 ///
1121 /// get foo => null; 895 /// get foo => null;
1122 /// m() { foo(null, 42); } 896 /// m() { foo(null, 42); }
1123 /// 897 ///
1124 R visitTopLevelGetterInvoke( 898 R visitTopLevelGetterInvoke(Send node, FunctionElement getter,
1125 Send node, 899 NodeList arguments, CallStructure callStructure, A arg);
1126 FunctionElement getter,
1127 NodeList arguments,
1128 CallStructure callStructure,
1129 A arg);
1130 900
1131 /// Invocation of the top level [setter] with [arguments]. 901 /// Invocation of the top level [setter] with [arguments].
1132 /// 902 ///
1133 /// For instance: 903 /// For instance:
1134 /// 904 ///
1135 /// set foo(_) {}; 905 /// set foo(_) {};
1136 /// m() { foo(null, 42); } 906 /// m() { foo(null, 42); }
1137 /// 907 ///
1138 R visitTopLevelSetterInvoke( 908 R visitTopLevelSetterInvoke(Send node, FunctionElement setter,
1139 Send node, 909 NodeList arguments, CallStructure callStructure, A arg);
1140 FunctionElement setter,
1141 NodeList arguments,
1142 CallStructure callStructure,
1143 A arg);
1144 910
1145 /// Read of the type literal for class [element]. 911 /// Read of the type literal for class [element].
1146 /// 912 ///
1147 /// For instance: 913 /// For instance:
1148 /// 914 ///
1149 /// class C {} 915 /// class C {}
1150 /// m() => C; 916 /// m() => C;
1151 /// 917 ///
1152 R visitClassTypeLiteralGet( 918 R visitClassTypeLiteralGet(Send node, ConstantExpression constant, A arg);
1153 Send node,
1154 ConstantExpression constant,
1155 A arg);
1156 919
1157 /// Invocation of the type literal for class [element] with [arguments]. 920 /// Invocation of the type literal for class [element] with [arguments].
1158 /// 921 ///
1159 /// For instance: 922 /// For instance:
1160 /// 923 ///
1161 /// class C {} 924 /// class C {}
1162 /// m() => C(null, 42); 925 /// m() => C(null, 42);
1163 /// 926 ///
1164 R visitClassTypeLiteralInvoke( 927 R visitClassTypeLiteralInvoke(Send node, ConstantExpression constant,
1165 Send node, 928 NodeList arguments, CallStructure callStructure, A arg);
1166 ConstantExpression constant,
1167 NodeList arguments,
1168 CallStructure callStructure,
1169 A arg);
1170 929
1171 /// Assignment of [rhs] to the type literal for class [element]. 930 /// Assignment of [rhs] to the type literal for class [element].
1172 /// 931 ///
1173 /// For instance: 932 /// For instance:
1174 /// 933 ///
1175 /// class C {} 934 /// class C {}
1176 /// m() { C = rhs; } 935 /// m() { C = rhs; }
1177 /// 936 ///
1178 R visitClassTypeLiteralSet( 937 R visitClassTypeLiteralSet(
1179 SendSet node, 938 SendSet node, ConstantExpression constant, Node rhs, A arg);
1180 ConstantExpression constant,
1181 Node rhs,
1182 A arg);
1183 939
1184 /// Read of the type literal for typedef [element]. 940 /// Read of the type literal for typedef [element].
1185 /// 941 ///
1186 /// For instance: 942 /// For instance:
1187 /// 943 ///
1188 /// typedef F(); 944 /// typedef F();
1189 /// m() => F; 945 /// m() => F;
1190 /// 946 ///
1191 R visitTypedefTypeLiteralGet( 947 R visitTypedefTypeLiteralGet(Send node, ConstantExpression constant, A arg);
1192 Send node,
1193 ConstantExpression constant,
1194 A arg);
1195 948
1196 /// Invocation of the type literal for typedef [element] with [arguments]. 949 /// Invocation of the type literal for typedef [element] with [arguments].
1197 /// 950 ///
1198 /// For instance: 951 /// For instance:
1199 /// 952 ///
1200 /// typedef F(); 953 /// typedef F();
1201 /// m() => F(null, 42); 954 /// m() => F(null, 42);
1202 /// 955 ///
1203 R visitTypedefTypeLiteralInvoke( 956 R visitTypedefTypeLiteralInvoke(Send node, ConstantExpression constant,
1204 Send node, 957 NodeList arguments, CallStructure callStructure, A arg);
1205 ConstantExpression constant,
1206 NodeList arguments,
1207 CallStructure callStructure,
1208 A arg);
1209 958
1210 /// Assignment of [rhs] to the type literal for typedef [element]. 959 /// Assignment of [rhs] to the type literal for typedef [element].
1211 /// 960 ///
1212 /// For instance: 961 /// For instance:
1213 /// 962 ///
1214 /// typedef F(); 963 /// typedef F();
1215 /// m() { F = rhs; } 964 /// m() { F = rhs; }
1216 /// 965 ///
1217 R visitTypedefTypeLiteralSet( 966 R visitTypedefTypeLiteralSet(
1218 SendSet node, 967 SendSet node, ConstantExpression constant, Node rhs, A arg);
1219 ConstantExpression constant,
1220 Node rhs,
1221 A arg);
1222 968
1223 /// Read of the type literal for type variable [element]. 969 /// Read of the type literal for type variable [element].
1224 /// 970 ///
1225 /// For instance: 971 /// For instance:
1226 /// 972 ///
1227 /// class C<T> { 973 /// class C<T> {
1228 /// m() => T; 974 /// m() => T;
1229 /// } 975 /// }
1230 /// 976 ///
1231 R visitTypeVariableTypeLiteralGet( 977 R visitTypeVariableTypeLiteralGet(
1232 Send node, 978 Send node, TypeVariableElement element, A arg);
1233 TypeVariableElement element,
1234 A arg);
1235 979
1236 /// Invocation of the type literal for type variable [element] with 980 /// Invocation of the type literal for type variable [element] with
1237 /// [arguments]. 981 /// [arguments].
1238 /// 982 ///
1239 /// For instance: 983 /// For instance:
1240 /// 984 ///
1241 /// class C<T> { 985 /// class C<T> {
1242 /// m() { T(null, 42); } 986 /// m() { T(null, 42); }
1243 /// } 987 /// }
1244 /// 988 ///
1245 R visitTypeVariableTypeLiteralInvoke( 989 R visitTypeVariableTypeLiteralInvoke(Send node, TypeVariableElement element,
1246 Send node, 990 NodeList arguments, CallStructure callStructure, A arg);
1247 TypeVariableElement element,
1248 NodeList arguments,
1249 CallStructure callStructure,
1250 A arg);
1251 991
1252 /// Assignment of [rhs] to the type literal for type variable [element]. 992 /// Assignment of [rhs] to the type literal for type variable [element].
1253 /// 993 ///
1254 /// For instance: 994 /// For instance:
1255 /// 995 ///
1256 /// class C<T> { 996 /// class C<T> {
1257 /// m() { T = rhs; } 997 /// m() { T = rhs; }
1258 /// } 998 /// }
1259 /// 999 ///
1260 R visitTypeVariableTypeLiteralSet( 1000 R visitTypeVariableTypeLiteralSet(
1261 SendSet node, 1001 SendSet node, TypeVariableElement element, Node rhs, A arg);
1262 TypeVariableElement element,
1263 Node rhs,
1264 A arg);
1265 1002
1266 /// Read of the type literal for `dynamic`. 1003 /// Read of the type literal for `dynamic`.
1267 /// 1004 ///
1268 /// For instance: 1005 /// For instance:
1269 /// 1006 ///
1270 /// m() => dynamic; 1007 /// m() => dynamic;
1271 /// 1008 ///
1272 R visitDynamicTypeLiteralGet( 1009 R visitDynamicTypeLiteralGet(Send node, ConstantExpression constant, A arg);
1273 Send node,
1274 ConstantExpression constant,
1275 A arg);
1276 1010
1277 /// Invocation of the type literal for `dynamic` with [arguments]. 1011 /// Invocation of the type literal for `dynamic` with [arguments].
1278 /// 1012 ///
1279 /// For instance: 1013 /// For instance:
1280 /// 1014 ///
1281 /// m() { dynamic(null, 42); } 1015 /// m() { dynamic(null, 42); }
1282 /// 1016 ///
1283 R visitDynamicTypeLiteralInvoke( 1017 R visitDynamicTypeLiteralInvoke(Send node, ConstantExpression constant,
1284 Send node, 1018 NodeList arguments, CallStructure callStructure, A arg);
1285 ConstantExpression constant,
1286 NodeList arguments,
1287 CallStructure callStructure,
1288 A arg);
1289 1019
1290 /// Assignment of [rhs] to the type literal for `dynamic`. 1020 /// Assignment of [rhs] to the type literal for `dynamic`.
1291 /// 1021 ///
1292 /// For instance: 1022 /// For instance:
1293 /// 1023 ///
1294 /// m() { dynamic = rhs; } 1024 /// m() { dynamic = rhs; }
1295 /// 1025 ///
1296 R visitDynamicTypeLiteralSet( 1026 R visitDynamicTypeLiteralSet(
1297 SendSet node, 1027 SendSet node, ConstantExpression constant, Node rhs, A arg);
1298 ConstantExpression constant,
1299 Node rhs,
1300 A arg);
1301 1028
1302 /// Binary expression `left operator right` where [operator] is a user 1029 /// Binary expression `left operator right` where [operator] is a user
1303 /// definable operator. Binary expressions using operator `==` are handled 1030 /// definable operator. Binary expressions using operator `==` are handled
1304 /// by [visitEquals] and index operations `a[b]` are handled by [visitIndex]. 1031 /// by [visitEquals] and index operations `a[b]` are handled by [visitIndex].
1305 /// 1032 ///
1306 /// For instance: 1033 /// For instance:
1307 /// 1034 ///
1308 /// add(a, b) => a + b; 1035 /// add(a, b) => a + b;
1309 /// sub(a, b) => a - b; 1036 /// sub(a, b) => a - b;
1310 /// mul(a, b) => a * b; 1037 /// mul(a, b) => a * b;
1311 /// 1038 ///
1312 R visitBinary( 1039 R visitBinary(
1313 Send node, 1040 Send node, Node left, BinaryOperator operator, Node right, A arg);
1314 Node left,
1315 BinaryOperator operator,
1316 Node right,
1317 A arg);
1318 1041
1319 /// Binary expression `super operator argument` where [operator] is a user 1042 /// Binary expression `super operator argument` where [operator] is a user
1320 /// definable operator implemented on a superclass by [function]. Binary 1043 /// definable operator implemented on a superclass by [function]. Binary
1321 /// expressions using operator `==` are handled by [visitSuperEquals]. 1044 /// expressions using operator `==` are handled by [visitSuperEquals].
1322 /// 1045 ///
1323 /// For instance: 1046 /// For instance:
1324 /// 1047 ///
1325 /// class B { 1048 /// class B {
1326 /// operator +(_) => null; 1049 /// operator +(_) => null;
1327 /// } 1050 /// }
1328 /// class C extends B { 1051 /// class C extends B {
1329 /// m(a) => super + a; 1052 /// m(a) => super + a;
1330 /// } 1053 /// }
1331 /// 1054 ///
1332 R visitSuperBinary( 1055 R visitSuperBinary(Send node, FunctionElement function,
1333 Send node, 1056 BinaryOperator operator, Node argument, A arg);
1334 FunctionElement function,
1335 BinaryOperator operator,
1336 Node argument,
1337 A arg);
1338 1057
1339 /// Binary operation on the unresolved super [element]. 1058 /// Binary operation on the unresolved super [element].
1340 /// 1059 ///
1341 /// For instance: 1060 /// For instance:
1342 /// 1061 ///
1343 /// class B { 1062 /// class B {
1344 /// } 1063 /// }
1345 /// class C extends B { 1064 /// class C extends B {
1346 /// m() => super + 42; 1065 /// m() => super + 42;
1347 /// } 1066 /// }
1348 /// 1067 ///
1349 R visitUnresolvedSuperBinary( 1068 R visitUnresolvedSuperBinary(Send node, Element element,
1350 Send node, 1069 BinaryOperator operator, Node argument, A arg);
1351 Element element,
1352 BinaryOperator operator,
1353 Node argument,
1354 A arg);
1355 1070
1356 /// Index expression `receiver[index]`. 1071 /// Index expression `receiver[index]`.
1357 /// 1072 ///
1358 /// For instance: 1073 /// For instance:
1359 /// 1074 ///
1360 /// lookup(a, b) => a[b]; 1075 /// lookup(a, b) => a[b];
1361 /// 1076 ///
1362 R visitIndex( 1077 R visitIndex(Send node, Node receiver, Node index, A arg);
1363 Send node,
1364 Node receiver,
1365 Node index,
1366 A arg);
1367 1078
1368 /// Prefix operation on an index expression `operator receiver[index]` where 1079 /// Prefix operation on an index expression `operator receiver[index]` where
1369 /// the operation is defined by [operator]. 1080 /// the operation is defined by [operator].
1370 /// 1081 ///
1371 /// For instance: 1082 /// For instance:
1372 /// 1083 ///
1373 /// lookup(a, b) => --a[b]; 1084 /// lookup(a, b) => --a[b];
1374 /// 1085 ///
1375 R visitIndexPrefix( 1086 R visitIndexPrefix(
1376 Send node, 1087 Send node, Node receiver, Node index, IncDecOperator operator, A arg);
1377 Node receiver,
1378 Node index,
1379 IncDecOperator operator,
1380 A arg);
1381 1088
1382 /// Postfix operation on an index expression `receiver[index] operator` where 1089 /// Postfix operation on an index expression `receiver[index] operator` where
1383 /// the operation is defined by [operator]. 1090 /// the operation is defined by [operator].
1384 /// 1091 ///
1385 /// For instance: 1092 /// For instance:
1386 /// 1093 ///
1387 /// lookup(a, b) => a[b]++; 1094 /// lookup(a, b) => a[b]++;
1388 /// 1095 ///
1389 R visitIndexPostfix( 1096 R visitIndexPostfix(
1390 Send node, 1097 Send node, Node receiver, Node index, IncDecOperator operator, A arg);
1391 Node receiver,
1392 Node index,
1393 IncDecOperator operator,
1394 A arg);
1395 1098
1396 /// Index expression `super[index]` where 'operator []' is implemented on a 1099 /// Index expression `super[index]` where 'operator []' is implemented on a
1397 /// superclass by [function]. 1100 /// superclass by [function].
1398 /// 1101 ///
1399 /// For instance: 1102 /// For instance:
1400 /// 1103 ///
1401 /// class B { 1104 /// class B {
1402 /// operator [](_) => null; 1105 /// operator [](_) => null;
1403 /// } 1106 /// }
1404 /// class C extends B { 1107 /// class C extends B {
1405 /// m(a) => super[a]; 1108 /// m(a) => super[a];
1406 /// } 1109 /// }
1407 /// 1110 ///
1408 R visitSuperIndex( 1111 R visitSuperIndex(Send node, FunctionElement function, Node index, A arg);
1409 Send node,
1410 FunctionElement function,
1411 Node index,
1412 A arg);
1413 1112
1414 /// Index expression `super[index]` where 'operator []' is unresolved. 1113 /// Index expression `super[index]` where 'operator []' is unresolved.
1415 /// 1114 ///
1416 /// For instance: 1115 /// For instance:
1417 /// 1116 ///
1418 /// class B {} 1117 /// class B {}
1419 /// class C extends B { 1118 /// class C extends B {
1420 /// m(a) => super[a]; 1119 /// m(a) => super[a];
1421 /// } 1120 /// }
1422 /// 1121 ///
1423 R visitUnresolvedSuperIndex( 1122 R visitUnresolvedSuperIndex(Send node, Element element, Node index, A arg);
1424 Send node,
1425 Element element,
1426 Node index,
1427 A arg);
1428 1123
1429 /// Prefix operation on an index expression `operator super[index]` where 1124 /// Prefix operation on an index expression `operator super[index]` where
1430 /// 'operator []' is implemented on a superclass by [indexFunction] and 1125 /// 'operator []' is implemented on a superclass by [indexFunction] and
1431 /// 'operator []=' is implemented on by [indexSetFunction] and the operation 1126 /// 'operator []=' is implemented on by [indexSetFunction] and the operation
1432 /// is defined by [operator]. 1127 /// is defined by [operator].
1433 /// 1128 ///
1434 /// For instance: 1129 /// For instance:
1435 /// 1130 ///
1436 /// class B { 1131 /// class B {
1437 /// operator [](_) => null; 1132 /// operator [](_) => null;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 /// 1173 ///
1479 /// For instance: 1174 /// For instance:
1480 /// 1175 ///
1481 /// class B { 1176 /// class B {
1482 /// operator []=(a, b) {} 1177 /// operator []=(a, b) {}
1483 /// } 1178 /// }
1484 /// class C extends B { 1179 /// class C extends B {
1485 /// m(a) => --super[a]; 1180 /// m(a) => --super[a];
1486 /// } 1181 /// }
1487 /// 1182 ///
1488 R visitUnresolvedSuperGetterIndexPrefix( 1183 R visitUnresolvedSuperGetterIndexPrefix(Send node, Element element,
1489 Send node, 1184 MethodElement setter, Node index, IncDecOperator operator, A arg);
1490 Element element,
1491 MethodElement setter,
1492 Node index,
1493 IncDecOperator operator,
1494 A arg);
1495 1185
1496 /// Postfix operation on an index expression `super[index] operator` where 1186 /// Postfix operation on an index expression `super[index] operator` where
1497 /// 'operator []' is unresolved, 'operator []=' is defined by [setter], and 1187 /// 'operator []' is unresolved, 'operator []=' is defined by [setter], and
1498 /// the operation is defined by [operator]. 1188 /// the operation is defined by [operator].
1499 /// 1189 ///
1500 /// For instance: 1190 /// For instance:
1501 /// 1191 ///
1502 /// class B { 1192 /// class B {
1503 /// operator []=(a, b) {} 1193 /// operator []=(a, b) {}
1504 /// } 1194 /// }
1505 /// class C extends B { 1195 /// class C extends B {
1506 /// m(a) => super[a]++; 1196 /// m(a) => super[a]++;
1507 /// } 1197 /// }
1508 /// 1198 ///
1509 R visitUnresolvedSuperGetterIndexPostfix( 1199 R visitUnresolvedSuperGetterIndexPostfix(Send node, Element element,
1510 Send node, 1200 MethodElement setter, Node index, IncDecOperator operator, A arg);
1511 Element element,
1512 MethodElement setter,
1513 Node index,
1514 IncDecOperator operator,
1515 A arg);
1516 1201
1517 /// Prefix operation on an index expression `operator super[index]` where 1202 /// Prefix operation on an index expression `operator super[index]` where
1518 /// 'operator []' is implemented on a superclass by [indexFunction] and 1203 /// 'operator []' is implemented on a superclass by [indexFunction] and
1519 /// 'operator []=' is unresolved and the operation is defined by [operator]. 1204 /// 'operator []=' is unresolved and the operation is defined by [operator].
1520 /// 1205 ///
1521 /// For instance: 1206 /// For instance:
1522 /// 1207 ///
1523 /// class B { 1208 /// class B {
1524 /// operator [](_) => 42; 1209 /// operator [](_) => 42;
1525 /// } 1210 /// }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 /// For instance: 1248 /// For instance:
1564 /// 1249 ///
1565 /// class B { 1250 /// class B {
1566 /// operator [](_) => 42; 1251 /// operator [](_) => 42;
1567 /// } 1252 /// }
1568 /// class C extends B { 1253 /// class C extends B {
1569 /// m(a) => super[a]++; 1254 /// m(a) => super[a]++;
1570 /// } 1255 /// }
1571 /// 1256 ///
1572 R visitUnresolvedSuperIndexPrefix( 1257 R visitUnresolvedSuperIndexPrefix(
1573 Send node, 1258 Send node, Element element, Node index, IncDecOperator operator, A arg);
1574 Element element,
1575 Node index,
1576 IncDecOperator operator,
1577 A arg);
1578 1259
1579 /// Postfix operation on an index expression `super[index] operator` where 1260 /// Postfix operation on an index expression `super[index] operator` where
1580 /// both 'operator []' and 'operator []=' are unresolved and the operation is 1261 /// both 'operator []' and 'operator []=' are unresolved and the operation is
1581 /// defined by [operator]. 1262 /// defined by [operator].
1582 /// 1263 ///
1583 /// For instance: 1264 /// For instance:
1584 /// 1265 ///
1585 /// class B { 1266 /// class B {
1586 /// operator [](_) => 42; 1267 /// operator [](_) => 42;
1587 /// } 1268 /// }
1588 /// class C extends B { 1269 /// class C extends B {
1589 /// m(a) => super[a]++; 1270 /// m(a) => super[a]++;
1590 /// } 1271 /// }
1591 /// 1272 ///
1592 R visitUnresolvedSuperIndexPostfix( 1273 R visitUnresolvedSuperIndexPostfix(
1593 Send node, 1274 Send node, Element element, Node index, IncDecOperator operator, A arg);
1594 Element element,
1595 Node index,
1596 IncDecOperator operator,
1597 A arg);
1598 1275
1599 /// Binary expression `left == right`. 1276 /// Binary expression `left == right`.
1600 /// 1277 ///
1601 /// For instance: 1278 /// For instance:
1602 /// 1279 ///
1603 /// neq(a, b) => a != b; 1280 /// neq(a, b) => a != b;
1604 /// 1281 ///
1605 R visitNotEquals( 1282 R visitNotEquals(Send node, Node left, Node right, A arg);
1606 Send node,
1607 Node left,
1608 Node right,
1609 A arg);
1610 1283
1611 /// Binary expression `super != argument` where `==` is implemented on a 1284 /// Binary expression `super != argument` where `==` is implemented on a
1612 /// superclass by [function]. 1285 /// superclass by [function].
1613 /// 1286 ///
1614 /// For instance: 1287 /// For instance:
1615 /// 1288 ///
1616 /// class B { 1289 /// class B {
1617 /// operator +(_) => null; 1290 /// operator +(_) => null;
1618 /// } 1291 /// }
1619 /// class C extends B { 1292 /// class C extends B {
1620 /// m(a) => super + a; 1293 /// m(a) => super + a;
1621 /// } 1294 /// }
1622 /// 1295 ///
1623 R visitSuperNotEquals( 1296 R visitSuperNotEquals(
1624 Send node, 1297 Send node, FunctionElement function, Node argument, A arg);
1625 FunctionElement function,
1626 Node argument,
1627 A arg);
1628 1298
1629 /// Binary expression `left == right`. 1299 /// Binary expression `left == right`.
1630 /// 1300 ///
1631 /// For instance: 1301 /// For instance:
1632 /// 1302 ///
1633 /// eq(a, b) => a == b; 1303 /// eq(a, b) => a == b;
1634 /// 1304 ///
1635 R visitEquals( 1305 R visitEquals(Send node, Node left, Node right, A arg);
1636 Send node,
1637 Node left,
1638 Node right,
1639 A arg);
1640 1306
1641 /// Binary expression `super == argument` where `==` is implemented on a 1307 /// Binary expression `super == argument` where `==` is implemented on a
1642 /// superclass by [function]. 1308 /// superclass by [function].
1643 /// 1309 ///
1644 /// For instance: 1310 /// For instance:
1645 /// 1311 ///
1646 /// class B { 1312 /// class B {
1647 /// operator ==(_) => null; 1313 /// operator ==(_) => null;
1648 /// } 1314 /// }
1649 /// class C extends B { 1315 /// class C extends B {
1650 /// m(a) => super == a; 1316 /// m(a) => super == a;
1651 /// } 1317 /// }
1652 /// 1318 ///
1653 R visitSuperEquals( 1319 R visitSuperEquals(Send node, FunctionElement function, Node argument, A arg);
1654 Send node,
1655 FunctionElement function,
1656 Node argument,
1657 A arg);
1658 1320
1659 /// Unary expression `operator expression` where [operator] is a user 1321 /// Unary expression `operator expression` where [operator] is a user
1660 /// definable operator. 1322 /// definable operator.
1661 /// 1323 ///
1662 /// For instance: 1324 /// For instance:
1663 /// 1325 ///
1664 /// neg(a, b) => -a; 1326 /// neg(a, b) => -a;
1665 /// comp(a, b) => ~a; 1327 /// comp(a, b) => ~a;
1666 /// 1328 ///
1667 R visitUnary( 1329 R visitUnary(Send node, UnaryOperator operator, Node expression, A arg);
1668 Send node,
1669 UnaryOperator operator,
1670 Node expression,
1671 A arg);
1672 1330
1673 /// Unary expression `operator super` where [operator] is a user definable 1331 /// Unary expression `operator super` where [operator] is a user definable
1674 /// operator implemented on a superclass by [function]. 1332 /// operator implemented on a superclass by [function].
1675 /// 1333 ///
1676 /// For instance: 1334 /// For instance:
1677 /// 1335 ///
1678 /// class B { 1336 /// class B {
1679 /// operator -() => null; 1337 /// operator -() => null;
1680 /// } 1338 /// }
1681 /// class C extends B { 1339 /// class C extends B {
1682 /// m(a) => -super; 1340 /// m(a) => -super;
1683 /// } 1341 /// }
1684 /// 1342 ///
1685 R visitSuperUnary( 1343 R visitSuperUnary(
1686 Send node, 1344 Send node, UnaryOperator operator, FunctionElement function, A arg);
1687 UnaryOperator operator,
1688 FunctionElement function,
1689 A arg);
1690 1345
1691 /// Unary operation on the unresolved super [element]. 1346 /// Unary operation on the unresolved super [element].
1692 /// 1347 ///
1693 /// For instance: 1348 /// For instance:
1694 /// 1349 ///
1695 /// class B { 1350 /// class B {
1696 /// } 1351 /// }
1697 /// class C extends B { 1352 /// class C extends B {
1698 /// m() => -super; 1353 /// m() => -super;
1699 /// } 1354 /// }
1700 /// 1355 ///
1701 R visitUnresolvedSuperUnary( 1356 R visitUnresolvedSuperUnary(
1702 Send node, 1357 Send node, UnaryOperator operator, Element element, A arg);
1703 UnaryOperator operator,
1704 Element element,
1705 A arg);
1706 1358
1707 /// Unary expression `!expression`. 1359 /// Unary expression `!expression`.
1708 /// 1360 ///
1709 /// For instance: 1361 /// For instance:
1710 /// 1362 ///
1711 /// not(a) => !a; 1363 /// not(a) => !a;
1712 /// 1364 ///
1713 R visitNot( 1365 R visitNot(Send node, Node expression, A arg);
1714 Send node,
1715 Node expression,
1716 A arg);
1717 1366
1718 /// Index set expression `receiver[index] = rhs`. 1367 /// Index set expression `receiver[index] = rhs`.
1719 /// 1368 ///
1720 /// For instance: 1369 /// For instance:
1721 /// 1370 ///
1722 /// m(receiver, index, rhs) => receiver[index] = rhs; 1371 /// m(receiver, index, rhs) => receiver[index] = rhs;
1723 /// 1372 ///
1724 R visitIndexSet( 1373 R visitIndexSet(SendSet node, Node receiver, Node index, Node rhs, A arg);
1725 SendSet node,
1726 Node receiver,
1727 Node index,
1728 Node rhs,
1729 A arg);
1730 1374
1731 /// Index set expression `super[index] = rhs` where `operator []=` is defined 1375 /// Index set expression `super[index] = rhs` where `operator []=` is defined
1732 /// on a superclass by [function]. 1376 /// on a superclass by [function].
1733 /// 1377 ///
1734 /// For instance: 1378 /// For instance:
1735 /// 1379 ///
1736 /// class B { 1380 /// class B {
1737 /// operator []=(a, b) {} 1381 /// operator []=(a, b) {}
1738 /// } 1382 /// }
1739 /// class C extends B { 1383 /// class C extends B {
1740 /// m(a, b) => super[a] = b; 1384 /// m(a, b) => super[a] = b;
1741 /// } 1385 /// }
1742 /// 1386 ///
1743 R visitSuperIndexSet( 1387 R visitSuperIndexSet(
1744 SendSet node, 1388 SendSet node, FunctionElement function, Node index, Node rhs, A arg);
1745 FunctionElement function,
1746 Node index,
1747 Node rhs,
1748 A arg);
1749 1389
1750 /// Index set expression `super[index] = rhs` where `operator []=` is 1390 /// Index set expression `super[index] = rhs` where `operator []=` is
1751 /// undefined. 1391 /// undefined.
1752 /// 1392 ///
1753 /// For instance: 1393 /// For instance:
1754 /// 1394 ///
1755 /// class B { 1395 /// class B {
1756 /// } 1396 /// }
1757 /// class C extends B { 1397 /// class C extends B {
1758 /// m() => super[1] = 42; 1398 /// m() => super[1] = 42;
1759 /// } 1399 /// }
1760 /// 1400 ///
1761 R visitUnresolvedSuperIndexSet( 1401 R visitUnresolvedSuperIndexSet(
1762 Send node, 1402 Send node, Element element, Node index, Node rhs, A arg);
1763 Element element,
1764 Node index,
1765 Node rhs,
1766 A arg);
1767 1403
1768 /// If-null, ??, expression with operands [left] and [right]. 1404 /// If-null, ??, expression with operands [left] and [right].
1769 /// 1405 ///
1770 /// For instance: 1406 /// For instance:
1771 /// 1407 ///
1772 /// m() => left ?? right; 1408 /// m() => left ?? right;
1773 /// 1409 ///
1774 R visitIfNull( 1410 R visitIfNull(Send node, Node left, Node right, A arg);
1775 Send node,
1776 Node left,
1777 Node right,
1778 A arg);
1779 1411
1780 /// Logical and, &&, expression with operands [left] and [right]. 1412 /// Logical and, &&, expression with operands [left] and [right].
1781 /// 1413 ///
1782 /// For instance: 1414 /// For instance:
1783 /// 1415 ///
1784 /// m() => left && right; 1416 /// m() => left && right;
1785 /// 1417 ///
1786 R visitLogicalAnd( 1418 R visitLogicalAnd(Send node, Node left, Node right, A arg);
1787 Send node,
1788 Node left,
1789 Node right,
1790 A arg);
1791 1419
1792 /// Logical or, ||, expression with operands [left] and [right]. 1420 /// Logical or, ||, expression with operands [left] and [right].
1793 /// 1421 ///
1794 /// For instance: 1422 /// For instance:
1795 /// 1423 ///
1796 /// m() => left || right; 1424 /// m() => left || right;
1797 /// 1425 ///
1798 R visitLogicalOr( 1426 R visitLogicalOr(Send node, Node left, Node right, A arg);
1799 Send node,
1800 Node left,
1801 Node right,
1802 A arg);
1803 1427
1804 /// Is test of [expression] against [type]. 1428 /// Is test of [expression] against [type].
1805 /// 1429 ///
1806 /// For instance: 1430 /// For instance:
1807 /// 1431 ///
1808 /// class C {} 1432 /// class C {}
1809 /// m() => expression is C; 1433 /// m() => expression is C;
1810 /// 1434 ///
1811 R visitIs( 1435 R visitIs(Send node, Node expression, DartType type, A arg);
1812 Send node,
1813 Node expression,
1814 DartType type,
1815 A arg);
1816 1436
1817 /// Is not test of [expression] against [type]. 1437 /// Is not test of [expression] against [type].
1818 /// 1438 ///
1819 /// For instance: 1439 /// For instance:
1820 /// 1440 ///
1821 /// class C {} 1441 /// class C {}
1822 /// m() => expression is! C; 1442 /// m() => expression is! C;
1823 /// 1443 ///
1824 R visitIsNot( 1444 R visitIsNot(Send node, Node expression, DartType type, A arg);
1825 Send node,
1826 Node expression,
1827 DartType type,
1828 A arg);
1829 1445
1830 /// As cast of [expression] to [type]. 1446 /// As cast of [expression] to [type].
1831 /// 1447 ///
1832 /// For instance: 1448 /// For instance:
1833 /// 1449 ///
1834 /// class C {} 1450 /// class C {}
1835 /// m() => expression as C; 1451 /// m() => expression as C;
1836 /// 1452 ///
1837 R visitAs( 1453 R visitAs(Send node, Node expression, DartType type, A arg);
1838 Send node,
1839 Node expression,
1840 DartType type,
1841 A arg);
1842 1454
1843 /// Compound assignment expression of [rhs] with [operator] of the property on 1455 /// Compound assignment expression of [rhs] with [operator] of the property on
1844 /// [receiver] whose getter and setter are defined by [getterSelector] and 1456 /// [receiver] whose getter and setter are defined by [getterSelector] and
1845 /// [setterSelector], respectively. 1457 /// [setterSelector], respectively.
1846 /// 1458 ///
1847 /// For instance: 1459 /// For instance:
1848 /// 1460 ///
1849 /// m(receiver, rhs) => receiver.foo += rhs; 1461 /// m(receiver, rhs) => receiver.foo += rhs;
1850 /// 1462 ///
1851 R visitDynamicPropertyCompound( 1463 R visitDynamicPropertyCompound(Send node, Node receiver, Name name,
1852 Send node, 1464 AssignmentOperator operator, Node rhs, A arg);
1853 Node receiver,
1854 Name name,
1855 AssignmentOperator operator,
1856 Node rhs,
1857 A arg);
1858 1465
1859 /// Compound assignment expression of [rhs] with [operator] of the property on 1466 /// Compound assignment expression of [rhs] with [operator] of the property on
1860 /// a possibly null [receiver] whose getter and setter are defined by 1467 /// a possibly null [receiver] whose getter and setter are defined by
1861 /// [getterSelector] and [setterSelector], respectively. 1468 /// [getterSelector] and [setterSelector], respectively.
1862 /// 1469 ///
1863 /// For instance: 1470 /// For instance:
1864 /// 1471 ///
1865 /// m(receiver, rhs) => receiver?.foo += rhs; 1472 /// m(receiver, rhs) => receiver?.foo += rhs;
1866 /// 1473 ///
1867 R visitIfNotNullDynamicPropertyCompound( 1474 R visitIfNotNullDynamicPropertyCompound(Send node, Node receiver, Name name,
1868 Send node, 1475 AssignmentOperator operator, Node rhs, A arg);
1869 Node receiver,
1870 Name name,
1871 AssignmentOperator operator,
1872 Node rhs,
1873 A arg);
1874 1476
1875 /// Compound assignment expression of [rhs] with [operator] of the property on 1477 /// Compound assignment expression of [rhs] with [operator] of the property on
1876 /// `this` whose getter and setter are defined by [getterSelector] and 1478 /// `this` whose getter and setter are defined by [getterSelector] and
1877 /// [setterSelector], respectively. 1479 /// [setterSelector], respectively.
1878 /// 1480 ///
1879 /// For instance: 1481 /// For instance:
1880 /// 1482 ///
1881 /// class C { 1483 /// class C {
1882 /// m(rhs) => this.foo += rhs; 1484 /// m(rhs) => this.foo += rhs;
1883 /// } 1485 /// }
1884 /// 1486 ///
1885 /// or 1487 /// or
1886 /// 1488 ///
1887 /// class C { 1489 /// class C {
1888 /// m(rhs) => foo += rhs; 1490 /// m(rhs) => foo += rhs;
1889 /// } 1491 /// }
1890 /// 1492 ///
1891 R visitThisPropertyCompound( 1493 R visitThisPropertyCompound(
1892 Send node, 1494 Send node, Name name, AssignmentOperator operator, Node rhs, A arg);
1893 Name name,
1894 AssignmentOperator operator,
1895 Node rhs,
1896 A arg);
1897 1495
1898 /// Compound assignment expression of [rhs] with [operator] on a [parameter]. 1496 /// Compound assignment expression of [rhs] with [operator] on a [parameter].
1899 /// 1497 ///
1900 /// For instance: 1498 /// For instance:
1901 /// 1499 ///
1902 /// m(parameter, rhs) => parameter += rhs; 1500 /// m(parameter, rhs) => parameter += rhs;
1903 /// 1501 ///
1904 R visitParameterCompound( 1502 R visitParameterCompound(Send node, ParameterElement parameter,
1905 Send node, 1503 AssignmentOperator operator, Node rhs, A arg);
1906 ParameterElement parameter,
1907 AssignmentOperator operator,
1908 Node rhs,
1909 A arg);
1910 1504
1911 /// Compound assignment expression of [rhs] with [operator] on a final 1505 /// Compound assignment expression of [rhs] with [operator] on a final
1912 /// [parameter]. 1506 /// [parameter].
1913 /// 1507 ///
1914 /// For instance: 1508 /// For instance:
1915 /// 1509 ///
1916 /// m(final parameter, rhs) => parameter += rhs; 1510 /// m(final parameter, rhs) => parameter += rhs;
1917 /// 1511 ///
1918 R visitFinalParameterCompound( 1512 R visitFinalParameterCompound(Send node, ParameterElement parameter,
1919 Send node, 1513 AssignmentOperator operator, Node rhs, A arg);
1920 ParameterElement parameter,
1921 AssignmentOperator operator,
1922 Node rhs,
1923 A arg);
1924 1514
1925 /// Compound assignment expression of [rhs] with [operator] on a local 1515 /// Compound assignment expression of [rhs] with [operator] on a local
1926 /// [variable]. 1516 /// [variable].
1927 /// 1517 ///
1928 /// For instance: 1518 /// For instance:
1929 /// 1519 ///
1930 /// m(rhs) { 1520 /// m(rhs) {
1931 /// var variable; 1521 /// var variable;
1932 /// variable += rhs; 1522 /// variable += rhs;
1933 /// } 1523 /// }
1934 /// 1524 ///
1935 R visitLocalVariableCompound( 1525 R visitLocalVariableCompound(Send node, LocalVariableElement variable,
1936 Send node, 1526 AssignmentOperator operator, Node rhs, A arg);
1937 LocalVariableElement variable,
1938 AssignmentOperator operator,
1939 Node rhs,
1940 A arg);
1941 1527
1942 /// Compound assignment expression of [rhs] with [operator] on a final local 1528 /// Compound assignment expression of [rhs] with [operator] on a final local
1943 /// [variable]. 1529 /// [variable].
1944 /// 1530 ///
1945 /// For instance: 1531 /// For instance:
1946 /// 1532 ///
1947 /// m(rhs) { 1533 /// m(rhs) {
1948 /// final variable = 0; 1534 /// final variable = 0;
1949 /// variable += rhs; 1535 /// variable += rhs;
1950 /// } 1536 /// }
1951 /// 1537 ///
1952 R visitFinalLocalVariableCompound( 1538 R visitFinalLocalVariableCompound(Send node, LocalVariableElement variable,
1953 Send node, 1539 AssignmentOperator operator, Node rhs, A arg);
1954 LocalVariableElement variable,
1955 AssignmentOperator operator,
1956 Node rhs,
1957 A arg);
1958 1540
1959 /// Compound assignment expression of [rhs] with [operator] on a local 1541 /// Compound assignment expression of [rhs] with [operator] on a local
1960 /// [function]. 1542 /// [function].
1961 /// 1543 ///
1962 /// For instance: 1544 /// For instance:
1963 /// 1545 ///
1964 /// m(rhs) { 1546 /// m(rhs) {
1965 /// function() {} 1547 /// function() {}
1966 /// function += rhs; 1548 /// function += rhs;
1967 /// } 1549 /// }
1968 /// 1550 ///
1969 R visitLocalFunctionCompound( 1551 R visitLocalFunctionCompound(Send node, LocalFunctionElement function,
1970 Send node, 1552 AssignmentOperator operator, Node rhs, A arg);
1971 LocalFunctionElement function,
1972 AssignmentOperator operator,
1973 Node rhs,
1974 A arg);
1975 1553
1976 /// Compound assignment expression of [rhs] with [operator] on a static 1554 /// Compound assignment expression of [rhs] with [operator] on a static
1977 /// [field]. 1555 /// [field].
1978 /// 1556 ///
1979 /// For instance: 1557 /// For instance:
1980 /// 1558 ///
1981 /// class C { 1559 /// class C {
1982 /// static var field; 1560 /// static var field;
1983 /// m(rhs) => field += rhs; 1561 /// m(rhs) => field += rhs;
1984 /// } 1562 /// }
1985 /// 1563 ///
1986 R visitStaticFieldCompound( 1564 R visitStaticFieldCompound(Send node, FieldElement field,
1987 Send node, 1565 AssignmentOperator operator, Node rhs, A arg);
1988 FieldElement field,
1989 AssignmentOperator operator,
1990 Node rhs,
1991 A arg);
1992 1566
1993 /// Compound assignment expression of [rhs] with [operator] on a final static 1567 /// Compound assignment expression of [rhs] with [operator] on a final static
1994 /// [field]. 1568 /// [field].
1995 /// 1569 ///
1996 /// For instance: 1570 /// For instance:
1997 /// 1571 ///
1998 /// class C { 1572 /// class C {
1999 /// static final field = 0; 1573 /// static final field = 0;
2000 /// m(rhs) => field += rhs; 1574 /// m(rhs) => field += rhs;
2001 /// } 1575 /// }
2002 /// 1576 ///
2003 R visitFinalStaticFieldCompound( 1577 R visitFinalStaticFieldCompound(Send node, FieldElement field,
2004 Send node, 1578 AssignmentOperator operator, Node rhs, A arg);
2005 FieldElement field,
2006 AssignmentOperator operator,
2007 Node rhs,
2008 A arg);
2009 1579
2010 /// Compound assignment expression of [rhs] with [operator] reading from a 1580 /// Compound assignment expression of [rhs] with [operator] reading from a
2011 /// static [getter] and writing to a static [setter]. 1581 /// static [getter] and writing to a static [setter].
2012 /// 1582 ///
2013 /// For instance: 1583 /// For instance:
2014 /// 1584 ///
2015 /// class C { 1585 /// class C {
2016 /// static get o => 0; 1586 /// static get o => 0;
2017 /// static set o(_) {} 1587 /// static set o(_) {}
2018 /// m(rhs) => o += rhs; 1588 /// m(rhs) => o += rhs;
2019 /// } 1589 /// }
2020 /// 1590 ///
2021 R visitStaticGetterSetterCompound( 1591 R visitStaticGetterSetterCompound(Send node, FunctionElement getter,
2022 Send node, 1592 FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
2023 FunctionElement getter,
2024 FunctionElement setter,
2025 AssignmentOperator operator,
2026 Node rhs,
2027 A arg);
2028 1593
2029 /// Compound assignment expression of [rhs] with [operator] reading from a 1594 /// Compound assignment expression of [rhs] with [operator] reading from a
2030 /// static [method], that is, closurizing [method], and writing to a static 1595 /// static [method], that is, closurizing [method], and writing to a static
2031 /// [setter]. 1596 /// [setter].
2032 /// 1597 ///
2033 /// For instance: 1598 /// For instance:
2034 /// 1599 ///
2035 /// class C { 1600 /// class C {
2036 /// static o() {} 1601 /// static o() {}
2037 /// static set o(_) {} 1602 /// static set o(_) {}
2038 /// m(rhs) => o += rhs; 1603 /// m(rhs) => o += rhs;
2039 /// } 1604 /// }
2040 /// 1605 ///
2041 R visitStaticMethodSetterCompound( 1606 R visitStaticMethodSetterCompound(Send node, MethodElement method,
2042 Send node, 1607 MethodElement setter, AssignmentOperator operator, Node rhs, A arg);
2043 MethodElement method,
2044 MethodElement setter,
2045 AssignmentOperator operator,
2046 Node rhs,
2047 A arg);
2048 1608
2049 /// Compound assignment expression of [rhs] with [operator] on a top level 1609 /// Compound assignment expression of [rhs] with [operator] on a top level
2050 /// [field]. 1610 /// [field].
2051 /// 1611 ///
2052 /// For instance: 1612 /// For instance:
2053 /// 1613 ///
2054 /// var field; 1614 /// var field;
2055 /// m(rhs) => field += rhs; 1615 /// m(rhs) => field += rhs;
2056 /// 1616 ///
2057 R visitTopLevelFieldCompound( 1617 R visitTopLevelFieldCompound(Send node, FieldElement field,
2058 Send node, 1618 AssignmentOperator operator, Node rhs, A arg);
2059 FieldElement field,
2060 AssignmentOperator operator,
2061 Node rhs,
2062 A arg);
2063 1619
2064 /// Compound assignment expression of [rhs] with [operator] on a final top 1620 /// Compound assignment expression of [rhs] with [operator] on a final top
2065 /// level [field]. 1621 /// level [field].
2066 /// 1622 ///
2067 /// For instance: 1623 /// For instance:
2068 /// 1624 ///
2069 /// final field = 0; 1625 /// final field = 0;
2070 /// m(rhs) => field += rhs; 1626 /// m(rhs) => field += rhs;
2071 /// 1627 ///
2072 R visitFinalTopLevelFieldCompound( 1628 R visitFinalTopLevelFieldCompound(Send node, FieldElement field,
2073 Send node, 1629 AssignmentOperator operator, Node rhs, A arg);
2074 FieldElement field,
2075 AssignmentOperator operator,
2076 Node rhs,
2077 A arg);
2078 1630
2079 /// Compound assignment expression of [rhs] with [operator] reading from a 1631 /// Compound assignment expression of [rhs] with [operator] reading from a
2080 /// top level [getter] and writing to a top level [setter]. 1632 /// top level [getter] and writing to a top level [setter].
2081 /// 1633 ///
2082 /// For instance: 1634 /// For instance:
2083 /// 1635 ///
2084 /// get o => 0; 1636 /// get o => 0;
2085 /// set o(_) {} 1637 /// set o(_) {}
2086 /// m(rhs) => o += rhs; 1638 /// m(rhs) => o += rhs;
2087 /// 1639 ///
2088 R visitTopLevelGetterSetterCompound( 1640 R visitTopLevelGetterSetterCompound(Send node, FunctionElement getter,
2089 Send node, 1641 FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
2090 FunctionElement getter,
2091 FunctionElement setter,
2092 AssignmentOperator operator,
2093 Node rhs,
2094 A arg);
2095 1642
2096 /// Compound assignment expression of [rhs] with [operator] reading from a 1643 /// Compound assignment expression of [rhs] with [operator] reading from a
2097 /// top level [method], that is, closurizing [method], and writing to a top 1644 /// top level [method], that is, closurizing [method], and writing to a top
2098 /// level [setter]. 1645 /// level [setter].
2099 /// 1646 ///
2100 /// For instance: 1647 /// For instance:
2101 /// 1648 ///
2102 /// o() {} 1649 /// o() {}
2103 /// set o(_) {} 1650 /// set o(_) {}
2104 /// m(rhs) => o += rhs; 1651 /// m(rhs) => o += rhs;
2105 /// 1652 ///
2106 R visitTopLevelMethodSetterCompound( 1653 R visitTopLevelMethodSetterCompound(Send node, FunctionElement method,
2107 Send node, 1654 FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
2108 FunctionElement method,
2109 FunctionElement setter,
2110 AssignmentOperator operator,
2111 Node rhs,
2112 A arg);
2113 1655
2114 /// Compound assignment expression of [rhs] with [operator] reading from a 1656 /// Compound assignment expression of [rhs] with [operator] reading from a
2115 /// top level [method], that is, closurizing [method], and writing to an 1657 /// top level [method], that is, closurizing [method], and writing to an
2116 /// unresolved setter. 1658 /// unresolved setter.
2117 /// 1659 ///
2118 /// For instance: 1660 /// For instance:
2119 /// 1661 ///
2120 /// o() {} 1662 /// o() {}
2121 /// m(rhs) => o += rhs; 1663 /// m(rhs) => o += rhs;
2122 /// 1664 ///
2123 R visitTopLevelMethodCompound( 1665 R visitTopLevelMethodCompound(Send node, FunctionElement method,
2124 Send node, 1666 AssignmentOperator operator, Node rhs, A arg);
2125 FunctionElement method,
2126 AssignmentOperator operator,
2127 Node rhs,
2128 A arg);
2129 1667
2130 /// Compound assignment expression of [rhs] with [operator] on a super 1668 /// Compound assignment expression of [rhs] with [operator] on a super
2131 /// [field]. 1669 /// [field].
2132 /// 1670 ///
2133 /// For instance: 1671 /// For instance:
2134 /// 1672 ///
2135 /// class B { 1673 /// class B {
2136 /// var field; 1674 /// var field;
2137 /// } 1675 /// }
2138 /// class C extends B { 1676 /// class C extends B {
2139 /// m(rhs) => super.field += rhs; 1677 /// m(rhs) => super.field += rhs;
2140 /// } 1678 /// }
2141 /// 1679 ///
2142 R visitSuperFieldCompound( 1680 R visitSuperFieldCompound(Send node, FieldElement field,
2143 Send node, 1681 AssignmentOperator operator, Node rhs, A arg);
2144 FieldElement field,
2145 AssignmentOperator operator,
2146 Node rhs,
2147 A arg);
2148 1682
2149 /// Compound assignment expression of [rhs] with [operator] on a final super 1683 /// Compound assignment expression of [rhs] with [operator] on a final super
2150 /// [field]. 1684 /// [field].
2151 /// 1685 ///
2152 /// For instance: 1686 /// For instance:
2153 /// 1687 ///
2154 /// class B { 1688 /// class B {
2155 /// final field = 42; 1689 /// final field = 42;
2156 /// } 1690 /// }
2157 /// class C extends B { 1691 /// class C extends B {
2158 /// m(rhs) => super.field += rhs; 1692 /// m(rhs) => super.field += rhs;
2159 /// } 1693 /// }
2160 /// 1694 ///
2161 R visitFinalSuperFieldCompound( 1695 R visitFinalSuperFieldCompound(Send node, FieldElement field,
2162 Send node, 1696 AssignmentOperator operator, Node rhs, A arg);
2163 FieldElement field,
2164 AssignmentOperator operator,
2165 Node rhs,
2166 A arg);
2167 1697
2168 /// If-null assignment expression of [rhs] to the [name] property on 1698 /// If-null assignment expression of [rhs] to the [name] property on
2169 /// [receiver]. That is, [rhs] is only evaluated and assigned, if the value 1699 /// [receiver]. That is, [rhs] is only evaluated and assigned, if the value
2170 /// of [name] on [receiver] is `null`. 1700 /// of [name] on [receiver] is `null`.
2171 /// 1701 ///
2172 /// For instance: 1702 /// For instance:
2173 /// 1703 ///
2174 /// m(receiver, rhs) => receiver.foo ??= rhs; 1704 /// m(receiver, rhs) => receiver.foo ??= rhs;
2175 /// 1705 ///
2176 R visitDynamicPropertySetIfNull( 1706 R visitDynamicPropertySetIfNull(
2177 Send node, 1707 Send node, Node receiver, Name name, Node rhs, A arg);
2178 Node receiver,
2179 Name name,
2180 Node rhs,
2181 A arg);
2182 1708
2183 /// If-null assignment expression of [rhs] to the [name] property on 1709 /// If-null assignment expression of [rhs] to the [name] property on
2184 /// [receiver] if not null. That is, [rhs] is only evaluated and assigned, 1710 /// [receiver] if not null. That is, [rhs] is only evaluated and assigned,
2185 /// if the value of [receiver] is _not_ `null` and the value of [name] on 1711 /// if the value of [receiver] is _not_ `null` and the value of [name] on
2186 /// [receiver] is `null`. 1712 /// [receiver] is `null`.
2187 /// 1713 ///
2188 /// For instance: 1714 /// For instance:
2189 /// 1715 ///
2190 /// m(receiver, rhs) => receiver?.foo ??= rhs; 1716 /// m(receiver, rhs) => receiver?.foo ??= rhs;
2191 /// 1717 ///
2192 R visitIfNotNullDynamicPropertySetIfNull( 1718 R visitIfNotNullDynamicPropertySetIfNull(
2193 Send node, 1719 Send node, Node receiver, Name name, Node rhs, A arg);
2194 Node receiver,
2195 Name name,
2196 Node rhs,
2197 A arg);
2198 1720
2199 /// If-null assignment expression of [rhs] to the [name] property on `this`. 1721 /// If-null assignment expression of [rhs] to the [name] property on `this`.
2200 /// That is, [rhs] is only evaluated and assigned, if the value of [name] on 1722 /// That is, [rhs] is only evaluated and assigned, if the value of [name] on
2201 /// `this` is `null`. 1723 /// `this` is `null`.
2202 /// 1724 ///
2203 /// For instance: 1725 /// For instance:
2204 /// 1726 ///
2205 /// class C { 1727 /// class C {
2206 /// m(rhs) => this.foo ??= rhs; 1728 /// m(rhs) => this.foo ??= rhs;
2207 /// } 1729 /// }
2208 /// 1730 ///
2209 /// or 1731 /// or
2210 /// 1732 ///
2211 /// class C { 1733 /// class C {
2212 /// m(rhs) => foo ??= rhs; 1734 /// m(rhs) => foo ??= rhs;
2213 /// } 1735 /// }
2214 /// 1736 ///
2215 R visitThisPropertySetIfNull( 1737 R visitThisPropertySetIfNull(Send node, Name name, Node rhs, A arg);
2216 Send node,
2217 Name name,
2218 Node rhs,
2219 A arg);
2220 1738
2221 /// If-null assignment expression of [rhs] to [parameter]. That is, [rhs] is 1739 /// If-null assignment expression of [rhs] to [parameter]. That is, [rhs] is
2222 /// only evaluated and assigned, if the value of the [parameter] is `null`. 1740 /// only evaluated and assigned, if the value of the [parameter] is `null`.
2223 /// 1741 ///
2224 /// For instance: 1742 /// For instance:
2225 /// 1743 ///
2226 /// m(parameter, rhs) => parameter ??= rhs; 1744 /// m(parameter, rhs) => parameter ??= rhs;
2227 /// 1745 ///
2228 R visitParameterSetIfNull( 1746 R visitParameterSetIfNull(
2229 Send node, 1747 Send node, ParameterElement parameter, Node rhs, A arg);
2230 ParameterElement parameter,
2231 Node rhs,
2232 A arg);
2233 1748
2234 /// If-null assignment expression of [rhs] to the final [parameter]. That is, 1749 /// If-null assignment expression of [rhs] to the final [parameter]. That is,
2235 /// [rhs] is only evaluated and assigned, if the value of the [parameter] is 1750 /// [rhs] is only evaluated and assigned, if the value of the [parameter] is
2236 /// `null`. 1751 /// `null`.
2237 /// 1752 ///
2238 /// For instance: 1753 /// For instance:
2239 /// 1754 ///
2240 /// m(final parameter, rhs) => parameter ??= rhs; 1755 /// m(final parameter, rhs) => parameter ??= rhs;
2241 /// 1756 ///
2242 R visitFinalParameterSetIfNull( 1757 R visitFinalParameterSetIfNull(
2243 Send node, 1758 Send node, ParameterElement parameter, Node rhs, A arg);
2244 ParameterElement parameter,
2245 Node rhs,
2246 A arg);
2247 1759
2248 /// If-null assignment expression of [rhs] to the local [variable]. That is, 1760 /// If-null assignment expression of [rhs] to the local [variable]. That is,
2249 /// [rhs] is only evaluated and assigned, if the value of the [variable] is 1761 /// [rhs] is only evaluated and assigned, if the value of the [variable] is
2250 /// `null`. 1762 /// `null`.
2251 /// 1763 ///
2252 /// For instance: 1764 /// For instance:
2253 /// 1765 ///
2254 /// m(rhs) { 1766 /// m(rhs) {
2255 /// var variable; 1767 /// var variable;
2256 /// variable ??= rhs; 1768 /// variable ??= rhs;
2257 /// } 1769 /// }
2258 /// 1770 ///
2259 R visitLocalVariableSetIfNull( 1771 R visitLocalVariableSetIfNull(
2260 Send node, 1772 Send node, LocalVariableElement variable, Node rhs, A arg);
2261 LocalVariableElement variable,
2262 Node rhs,
2263 A arg);
2264 1773
2265 /// If-null assignment expression of [rhs] to the final local [variable]. That 1774 /// If-null assignment expression of [rhs] to the final local [variable]. That
2266 /// is, [rhs] is only evaluated and assigned, if the value of the [variable] 1775 /// is, [rhs] is only evaluated and assigned, if the value of the [variable]
2267 /// is `null`. 1776 /// is `null`.
2268 /// 1777 ///
2269 /// For instance: 1778 /// For instance:
2270 /// 1779 ///
2271 /// m(rhs) { 1780 /// m(rhs) {
2272 /// final variable = 0; 1781 /// final variable = 0;
2273 /// variable ??= rhs; 1782 /// variable ??= rhs;
2274 /// } 1783 /// }
2275 /// 1784 ///
2276 R visitFinalLocalVariableSetIfNull( 1785 R visitFinalLocalVariableSetIfNull(
2277 Send node, 1786 Send node, LocalVariableElement variable, Node rhs, A arg);
2278 LocalVariableElement variable,
2279 Node rhs,
2280 A arg);
2281 1787
2282 /// If-null assignment expression of [rhs] to the local [function]. That is, 1788 /// If-null assignment expression of [rhs] to the local [function]. That is,
2283 /// [rhs] is only evaluated and assigned, if the value of the [function] is 1789 /// [rhs] is only evaluated and assigned, if the value of the [function] is
2284 /// `null`. The behavior is thus equivalent to a closurization of [function]. 1790 /// `null`. The behavior is thus equivalent to a closurization of [function].
2285 /// 1791 ///
2286 /// For instance: 1792 /// For instance:
2287 /// 1793 ///
2288 /// m(rhs) { 1794 /// m(rhs) {
2289 /// function() {} 1795 /// function() {}
2290 /// function ??= rhs; 1796 /// function ??= rhs;
2291 /// } 1797 /// }
2292 /// 1798 ///
2293 R visitLocalFunctionSetIfNull( 1799 R visitLocalFunctionSetIfNull(
2294 Send node, 1800 Send node, LocalFunctionElement function, Node rhs, A arg);
2295 LocalFunctionElement function,
2296 Node rhs,
2297 A arg);
2298 1801
2299 /// If-null assignment expression of [rhs] to the static [field]. That is, 1802 /// If-null assignment expression of [rhs] to the static [field]. That is,
2300 /// [rhs] is only evaluated and assigned, if the value of the [field] is 1803 /// [rhs] is only evaluated and assigned, if the value of the [field] is
2301 /// `null`. 1804 /// `null`.
2302 /// 1805 ///
2303 /// For instance: 1806 /// For instance:
2304 /// 1807 ///
2305 /// class C { 1808 /// class C {
2306 /// static var field; 1809 /// static var field;
2307 /// m(rhs) => field ??= rhs; 1810 /// m(rhs) => field ??= rhs;
2308 /// } 1811 /// }
2309 /// 1812 ///
2310 R visitStaticFieldSetIfNull( 1813 R visitStaticFieldSetIfNull(Send node, FieldElement field, Node rhs, A arg);
2311 Send node,
2312 FieldElement field,
2313 Node rhs,
2314 A arg);
2315 1814
2316 /// If-null assignment expression of [rhs] to the final static [field]. That 1815 /// If-null assignment expression of [rhs] to the final static [field]. That
2317 /// is, [rhs] is only evaluated and assigned, if the value of the [field] is 1816 /// is, [rhs] is only evaluated and assigned, if the value of the [field] is
2318 /// `null`. 1817 /// `null`.
2319 /// 1818 ///
2320 /// For instance: 1819 /// For instance:
2321 /// 1820 ///
2322 /// class C { 1821 /// class C {
2323 /// static final field = 0; 1822 /// static final field = 0;
2324 /// m(rhs) => field ??= rhs; 1823 /// m(rhs) => field ??= rhs;
2325 /// } 1824 /// }
2326 /// 1825 ///
2327 R visitFinalStaticFieldSetIfNull( 1826 R visitFinalStaticFieldSetIfNull(
2328 Send node, 1827 Send node, FieldElement field, Node rhs, A arg);
2329 FieldElement field,
2330 Node rhs,
2331 A arg);
2332 1828
2333 /// If-null assignment expression of [rhs] to the static property defined by 1829 /// If-null assignment expression of [rhs] to the static property defined by
2334 /// [getter] and [setter]. That is, [rhs] is only evaluated and assigned to 1830 /// [getter] and [setter]. That is, [rhs] is only evaluated and assigned to
2335 /// the [setter], if the value of the [getter] is `null`. 1831 /// the [setter], if the value of the [getter] is `null`.
2336 /// 1832 ///
2337 /// For instance: 1833 /// For instance:
2338 /// 1834 ///
2339 /// class C { 1835 /// class C {
2340 /// static get o => 0; 1836 /// static get o => 0;
2341 /// static set o(_) {} 1837 /// static set o(_) {}
2342 /// m(rhs) => o ??= rhs; 1838 /// m(rhs) => o ??= rhs;
2343 /// } 1839 /// }
2344 /// 1840 ///
2345 R visitStaticGetterSetterSetIfNull( 1841 R visitStaticGetterSetterSetIfNull(Send node, FunctionElement getter,
2346 Send node, 1842 FunctionElement setter, Node rhs, A arg);
2347 FunctionElement getter,
2348 FunctionElement setter,
2349 Node rhs,
2350 A arg);
2351 1843
2352 /// If-null assignment expression of [rhs] to the static property defined by 1844 /// If-null assignment expression of [rhs] to the static property defined by
2353 /// [method] and [setter]. That is, [rhs] is only evaluated and assigned to 1845 /// [method] and [setter]. That is, [rhs] is only evaluated and assigned to
2354 /// the [setter], if the value of the [method] is `null`. The behavior is thus 1846 /// the [setter], if the value of the [method] is `null`. The behavior is thus
2355 /// equivalent to a closurization of [method]. 1847 /// equivalent to a closurization of [method].
2356 /// 1848 ///
2357 /// For instance: 1849 /// For instance:
2358 /// 1850 ///
2359 /// class C { 1851 /// class C {
2360 /// static o() {} 1852 /// static o() {}
2361 /// static set o(_) {} 1853 /// static set o(_) {}
2362 /// m(rhs) => o ??= rhs; 1854 /// m(rhs) => o ??= rhs;
2363 /// } 1855 /// }
2364 /// 1856 ///
2365 R visitStaticMethodSetterSetIfNull( 1857 R visitStaticMethodSetterSetIfNull(
2366 Send node, 1858 Send node, MethodElement method, MethodElement setter, Node rhs, A arg);
2367 MethodElement method,
2368 MethodElement setter,
2369 Node rhs,
2370 A arg);
2371 1859
2372 /// If-null assignment expression of [rhs] to the static [method]. That is, 1860 /// If-null assignment expression of [rhs] to the static [method]. That is,
2373 /// [rhs] is only evaluated and assigned, if the value of the [method] is 1861 /// [rhs] is only evaluated and assigned, if the value of the [method] is
2374 /// `null`. The behavior is thus equivalent to a closurization of [method]. 1862 /// `null`. The behavior is thus equivalent to a closurization of [method].
2375 /// 1863 ///
2376 /// For instance: 1864 /// For instance:
2377 /// 1865 ///
2378 /// o() {} 1866 /// o() {}
2379 /// m(rhs) => o ??= rhs; 1867 /// m(rhs) => o ??= rhs;
2380 /// 1868 ///
2381 R visitStaticMethodSetIfNull( 1869 R visitStaticMethodSetIfNull(
2382 Send node, 1870 Send node, FunctionElement method, Node rhs, A arg);
2383 FunctionElement method,
2384 Node rhs,
2385 A arg);
2386 1871
2387 /// If-null assignment expression of [rhs] to the top level [field]. That is, 1872 /// If-null assignment expression of [rhs] to the top level [field]. That is,
2388 /// [rhs] is only evaluated and assigned, if the value of the [field] is 1873 /// [rhs] is only evaluated and assigned, if the value of the [field] is
2389 /// `null`. 1874 /// `null`.
2390 /// 1875 ///
2391 /// For instance: 1876 /// For instance:
2392 /// 1877 ///
2393 /// var field; 1878 /// var field;
2394 /// m(rhs) => field ??= rhs; 1879 /// m(rhs) => field ??= rhs;
2395 /// 1880 ///
2396 R visitTopLevelFieldSetIfNull( 1881 R visitTopLevelFieldSetIfNull(Send node, FieldElement field, Node rhs, A arg);
2397 Send node,
2398 FieldElement field,
2399 Node rhs,
2400 A arg);
2401 1882
2402 /// If-null assignment expression of [rhs] to the final top level [field]. 1883 /// If-null assignment expression of [rhs] to the final top level [field].
2403 /// That is, [rhs] is only evaluated and assigned, if the value of the [field] 1884 /// That is, [rhs] is only evaluated and assigned, if the value of the [field]
2404 /// is `null`. 1885 /// is `null`.
2405 /// 1886 ///
2406 /// For instance: 1887 /// For instance:
2407 /// 1888 ///
2408 /// final field = 0; 1889 /// final field = 0;
2409 /// m(rhs) => field ??= rhs; 1890 /// m(rhs) => field ??= rhs;
2410 /// 1891 ///
2411 R visitFinalTopLevelFieldSetIfNull( 1892 R visitFinalTopLevelFieldSetIfNull(
2412 Send node, 1893 Send node, FieldElement field, Node rhs, A arg);
2413 FieldElement field,
2414 Node rhs,
2415 A arg);
2416 1894
2417 /// If-null assignment expression of [rhs] to the top level property defined 1895 /// If-null assignment expression of [rhs] to the top level property defined
2418 /// by [getter] and [setter]. That is, [rhs] is only evaluated and assigned to 1896 /// by [getter] and [setter]. That is, [rhs] is only evaluated and assigned to
2419 /// the [setter], if the value of the [getter] is `null`. 1897 /// the [setter], if the value of the [getter] is `null`.
2420 /// 1898 ///
2421 /// For instance: 1899 /// For instance:
2422 /// 1900 ///
2423 /// get o => 0; 1901 /// get o => 0;
2424 /// set o(_) {} 1902 /// set o(_) {}
2425 /// m(rhs) => o ??= rhs; 1903 /// m(rhs) => o ??= rhs;
2426 /// 1904 ///
2427 R visitTopLevelGetterSetterSetIfNull( 1905 R visitTopLevelGetterSetterSetIfNull(Send node, FunctionElement getter,
2428 Send node, 1906 FunctionElement setter, Node rhs, A arg);
2429 FunctionElement getter,
2430 FunctionElement setter,
2431 Node rhs,
2432 A arg);
2433 1907
2434 /// If-null assignment expression of [rhs] to the top level property defined 1908 /// If-null assignment expression of [rhs] to the top level property defined
2435 /// by [method] and [setter]. That is, [rhs] is only evaluated and assigned to 1909 /// by [method] and [setter]. That is, [rhs] is only evaluated and assigned to
2436 /// the [setter], if the value of the [method] is `null`. The behavior is thus 1910 /// the [setter], if the value of the [method] is `null`. The behavior is thus
2437 /// equivalent to a closurization of [method]. 1911 /// equivalent to a closurization of [method].
2438 /// 1912 ///
2439 /// For instance: 1913 /// For instance:
2440 /// 1914 ///
2441 /// o() {} 1915 /// o() {}
2442 /// set o(_) {} 1916 /// set o(_) {}
2443 /// m(rhs) => o ??= rhs; 1917 /// m(rhs) => o ??= rhs;
2444 /// 1918 ///
2445 R visitTopLevelMethodSetterSetIfNull( 1919 R visitTopLevelMethodSetterSetIfNull(Send node, FunctionElement method,
2446 Send node, 1920 FunctionElement setter, Node rhs, A arg);
2447 FunctionElement method,
2448 FunctionElement setter,
2449 Node rhs,
2450 A arg);
2451 1921
2452 /// If-null assignment expression of [rhs] to the top level [method]. That is, 1922 /// If-null assignment expression of [rhs] to the top level [method]. That is,
2453 /// [rhs] is only evaluated and assigned, if the value of the [method] is 1923 /// [rhs] is only evaluated and assigned, if the value of the [method] is
2454 /// `null`. The behavior is thus equivalent to a closurization of [method]. 1924 /// `null`. The behavior is thus equivalent to a closurization of [method].
2455 /// 1925 ///
2456 /// For instance: 1926 /// For instance:
2457 /// 1927 ///
2458 /// o() {} 1928 /// o() {}
2459 /// m(rhs) => o ??= rhs; 1929 /// m(rhs) => o ??= rhs;
2460 /// 1930 ///
2461 R visitTopLevelMethodSetIfNull( 1931 R visitTopLevelMethodSetIfNull(
2462 Send node, 1932 Send node, FunctionElement method, Node rhs, A arg);
2463 FunctionElement method,
2464 Node rhs,
2465 A arg);
2466 1933
2467 /// If-null assignment expression of [rhs] to the super [field]. That is, 1934 /// If-null assignment expression of [rhs] to the super [field]. That is,
2468 /// [rhs] is only evaluated and assigned, if the value of the [field] is 1935 /// [rhs] is only evaluated and assigned, if the value of the [field] is
2469 /// `null`. 1936 /// `null`.
2470 /// 1937 ///
2471 /// For instance: 1938 /// For instance:
2472 /// 1939 ///
2473 /// class B { 1940 /// class B {
2474 /// var field; 1941 /// var field;
2475 /// } 1942 /// }
2476 /// class C extends B { 1943 /// class C extends B {
2477 /// m(rhs) => super.field ??= rhs; 1944 /// m(rhs) => super.field ??= rhs;
2478 /// } 1945 /// }
2479 /// 1946 ///
2480 R visitSuperFieldSetIfNull( 1947 R visitSuperFieldSetIfNull(Send node, FieldElement field, Node rhs, A arg);
2481 Send node,
2482 FieldElement field,
2483 Node rhs,
2484 A arg);
2485 1948
2486 /// If-null assignment expression of [rhs] to the final super [field]. That 1949 /// If-null assignment expression of [rhs] to the final super [field]. That
2487 /// is, [rhs] is only evaluated and assigned, if the value of the [field] is 1950 /// is, [rhs] is only evaluated and assigned, if the value of the [field] is
2488 /// `null`. 1951 /// `null`.
2489 /// 1952 ///
2490 /// For instance: 1953 /// For instance:
2491 /// 1954 ///
2492 /// class B { 1955 /// class B {
2493 /// final field = 42; 1956 /// final field = 42;
2494 /// } 1957 /// }
2495 /// class C extends B { 1958 /// class C extends B {
2496 /// m(rhs) => super.field ??= rhs; 1959 /// m(rhs) => super.field ??= rhs;
2497 /// } 1960 /// }
2498 /// 1961 ///
2499 R visitFinalSuperFieldSetIfNull( 1962 R visitFinalSuperFieldSetIfNull(
2500 Send node, 1963 Send node, FieldElement field, Node rhs, A arg);
2501 FieldElement field,
2502 Node rhs,
2503 A arg);
2504 1964
2505 /// If-null assignment expression of [rhs] to the super property defined 1965 /// If-null assignment expression of [rhs] to the super property defined
2506 /// by [readField] and [writtenField]. That is, [rhs] is only evaluated and 1966 /// by [readField] and [writtenField]. That is, [rhs] is only evaluated and
2507 /// assigned to the [writtenField], if the value of the [readField] is `null`. 1967 /// assigned to the [writtenField], if the value of the [readField] is `null`.
2508 /// 1968 ///
2509 /// For instance: 1969 /// For instance:
2510 /// 1970 ///
2511 /// class A { 1971 /// class A {
2512 /// var field; 1972 /// var field;
2513 /// } 1973 /// }
2514 /// class B extends A { 1974 /// class B extends A {
2515 /// final field; 1975 /// final field;
2516 /// } 1976 /// }
2517 /// class C extends B { 1977 /// class C extends B {
2518 /// m() => super.field ??= rhs; 1978 /// m() => super.field ??= rhs;
2519 /// } 1979 /// }
2520 /// 1980 ///
2521 R visitSuperFieldFieldSetIfNull( 1981 R visitSuperFieldFieldSetIfNull(Send node, FieldElement readField,
2522 Send node, 1982 FieldElement writtenField, Node rhs, A arg);
2523 FieldElement readField,
2524 FieldElement writtenField,
2525 Node rhs,
2526 A arg);
2527 1983
2528 /// If-null assignment expression of [rhs] to the super property defined 1984 /// If-null assignment expression of [rhs] to the super property defined
2529 /// by [getter] and [setter]. That is, [rhs] is only evaluated and assigned to 1985 /// by [getter] and [setter]. That is, [rhs] is only evaluated and assigned to
2530 /// the [setter], if the value of the [getter] is `null`. 1986 /// the [setter], if the value of the [getter] is `null`.
2531 /// 1987 ///
2532 /// For instance: 1988 /// For instance:
2533 /// 1989 ///
2534 /// class B { 1990 /// class B {
2535 /// get o => 0; 1991 /// get o => 0;
2536 /// set o(_) {} 1992 /// set o(_) {}
2537 /// } 1993 /// }
2538 /// class C extends B { 1994 /// class C extends B {
2539 /// m(rhs) => super.o ??= rhs; 1995 /// m(rhs) => super.o ??= rhs;
2540 /// } 1996 /// }
2541 /// 1997 ///
2542 R visitSuperGetterSetterSetIfNull( 1998 R visitSuperGetterSetterSetIfNull(Send node, FunctionElement getter,
2543 Send node, 1999 FunctionElement setter, Node rhs, A arg);
2544 FunctionElement getter,
2545 FunctionElement setter,
2546 Node rhs,
2547 A arg);
2548 2000
2549 /// If-null assignment expression of [rhs] to the super property defined 2001 /// If-null assignment expression of [rhs] to the super property defined
2550 /// by [method] and [setter]. That is, [rhs] is only evaluated and assigned to 2002 /// by [method] and [setter]. That is, [rhs] is only evaluated and assigned to
2551 /// the [setter], if the value of the [method] is `null`. The behavior is thus 2003 /// the [setter], if the value of the [method] is `null`. The behavior is thus
2552 /// equivalent to a closurization of [method]. 2004 /// equivalent to a closurization of [method].
2553 /// 2005 ///
2554 /// For instance: 2006 /// For instance:
2555 /// 2007 ///
2556 /// class B { 2008 /// class B {
2557 /// o() {} 2009 /// o() {}
2558 /// set o(_) {} 2010 /// set o(_) {}
2559 /// } 2011 /// }
2560 /// class C extends B { 2012 /// class C extends B {
2561 /// m(rhs) => super.o ??= rhs; 2013 /// m(rhs) => super.o ??= rhs;
2562 /// } 2014 /// }
2563 /// 2015 ///
2564 R visitSuperMethodSetterSetIfNull( 2016 R visitSuperMethodSetterSetIfNull(Send node, FunctionElement method,
2565 Send node, 2017 FunctionElement setter, Node rhs, A arg);
2566 FunctionElement method,
2567 FunctionElement setter,
2568 Node rhs,
2569 A arg);
2570 2018
2571 /// If-null assignment expression of [rhs] to the super [method]. 2019 /// If-null assignment expression of [rhs] to the super [method].
2572 /// That is, [rhs] is only evaluated and assigned, if the value of 2020 /// That is, [rhs] is only evaluated and assigned, if the value of
2573 /// the [method] is `null`. The behavior is thus equivalent to a closurization 2021 /// the [method] is `null`. The behavior is thus equivalent to a closurization
2574 /// of [method]. 2022 /// of [method].
2575 /// 2023 ///
2576 /// For instance: 2024 /// For instance:
2577 /// 2025 ///
2578 /// class B { 2026 /// class B {
2579 /// o() {} 2027 /// o() {}
2580 /// } 2028 /// }
2581 /// class C extends B { 2029 /// class C extends B {
2582 /// m(rhs) => super.o ??= rhs; 2030 /// m(rhs) => super.o ??= rhs;
2583 /// } 2031 /// }
2584 /// 2032 ///
2585 R visitSuperMethodSetIfNull( 2033 R visitSuperMethodSetIfNull(
2586 Send node, 2034 Send node, FunctionElement method, Node rhs, A arg);
2587 FunctionElement method,
2588 Node rhs,
2589 A arg);
2590 2035
2591 /// If-null assignment expression of [rhs] to the super property defined 2036 /// If-null assignment expression of [rhs] to the super property defined
2592 /// by [setter] with no corresponding getter. That is, [rhs] is only evaluated 2037 /// by [setter] with no corresponding getter. That is, [rhs] is only evaluated
2593 /// and assigned to the [setter], if the value of the unresolved getter is 2038 /// and assigned to the [setter], if the value of the unresolved getter is
2594 /// `null`. The behavior is thus equivalent to a no such method error. 2039 /// `null`. The behavior is thus equivalent to a no such method error.
2595 /// 2040 ///
2596 /// For instance: 2041 /// For instance:
2597 /// 2042 ///
2598 /// class B { 2043 /// class B {
2599 /// set o(_) {} 2044 /// set o(_) {}
2600 /// } 2045 /// }
2601 /// class C extends B { 2046 /// class C extends B {
2602 /// m(rhs) => super.o ??= rhs; 2047 /// m(rhs) => super.o ??= rhs;
2603 /// } 2048 /// }
2604 /// 2049 ///
2605 R visitUnresolvedSuperGetterSetIfNull( 2050 R visitUnresolvedSuperGetterSetIfNull(
2606 Send node, 2051 Send node, Element element, MethodElement setter, Node rhs, A arg);
2607 Element element,
2608 MethodElement setter,
2609 Node rhs,
2610 A arg);
2611 2052
2612 /// If-null assignment expression of [rhs] to the super property defined 2053 /// If-null assignment expression of [rhs] to the super property defined
2613 /// by [getter] with no corresponding setter. That is, [rhs] is only evaluated 2054 /// by [getter] with no corresponding setter. That is, [rhs] is only evaluated
2614 /// and assigned to the unresolved setter, if the value of the [getter] is 2055 /// and assigned to the unresolved setter, if the value of the [getter] is
2615 /// `null`. 2056 /// `null`.
2616 /// 2057 ///
2617 /// For instance: 2058 /// For instance:
2618 /// 2059 ///
2619 /// class B { 2060 /// class B {
2620 /// get o => 42; 2061 /// get o => 42;
2621 /// } 2062 /// }
2622 /// class C extends B { 2063 /// class C extends B {
2623 /// m(rhs) => super.o ??= rhs; 2064 /// m(rhs) => super.o ??= rhs;
2624 /// } 2065 /// }
2625 /// 2066 ///
2626 R visitUnresolvedSuperSetterSetIfNull( 2067 R visitUnresolvedSuperSetterSetIfNull(
2627 Send node, 2068 Send node, MethodElement getter, Element element, Node rhs, A arg);
2628 MethodElement getter,
2629 Element element,
2630 Node rhs,
2631 A arg);
2632 2069
2633 /// If-null assignment expression of [rhs] to the top level property defined 2070 /// If-null assignment expression of [rhs] to the top level property defined
2634 /// by [field] and [setter]. That is, [rhs] is only evaluated and assigned to 2071 /// by [field] and [setter]. That is, [rhs] is only evaluated and assigned to
2635 /// the [setter], if the value of the [field] is `null`. 2072 /// the [setter], if the value of the [field] is `null`.
2636 /// 2073 ///
2637 /// For instance: 2074 /// For instance:
2638 /// 2075 ///
2639 /// class A { 2076 /// class A {
2640 /// var o; 2077 /// var o;
2641 /// } 2078 /// }
2642 /// class B extends A { 2079 /// class B extends A {
2643 /// set o(_) {} 2080 /// set o(_) {}
2644 /// } 2081 /// }
2645 /// class C extends B { 2082 /// class C extends B {
2646 /// m(rhs) => super.o ??= rhs; 2083 /// m(rhs) => super.o ??= rhs;
2647 /// } 2084 /// }
2648 /// 2085 ///
2649 R visitSuperFieldSetterSetIfNull( 2086 R visitSuperFieldSetterSetIfNull(
2650 Send node, 2087 Send node, FieldElement field, FunctionElement setter, Node rhs, A arg);
2651 FieldElement field,
2652 FunctionElement setter,
2653 Node rhs,
2654 A arg);
2655 2088
2656 /// If-null assignment expression of [rhs] to the top level property defined 2089 /// If-null assignment expression of [rhs] to the top level property defined
2657 /// by [getter] and [field]. That is, [rhs] is only evaluated and assigned to 2090 /// by [getter] and [field]. That is, [rhs] is only evaluated and assigned to
2658 /// the [field], if the value of the [getter] is `null`. 2091 /// the [field], if the value of the [getter] is `null`.
2659 /// 2092 ///
2660 /// For instance: 2093 /// For instance:
2661 /// 2094 ///
2662 /// class A { 2095 /// class A {
2663 /// var o; 2096 /// var o;
2664 /// } 2097 /// }
2665 /// class B extends A { 2098 /// class B extends A {
2666 /// get o => 0; 2099 /// get o => 0;
2667 /// } 2100 /// }
2668 /// class C extends B { 2101 /// class C extends B {
2669 /// m(rhs) => super.o ??= rhs; 2102 /// m(rhs) => super.o ??= rhs;
2670 /// } 2103 /// }
2671 /// 2104 ///
2672 R visitSuperGetterFieldSetIfNull( 2105 R visitSuperGetterFieldSetIfNull(
2673 Send node, 2106 Send node, FunctionElement getter, FieldElement field, Node rhs, A arg);
2674 FunctionElement getter,
2675 FieldElement field,
2676 Node rhs,
2677 A arg);
2678 2107
2679 /// If-null assignment expression of [rhs] to an unresolved super property. 2108 /// If-null assignment expression of [rhs] to an unresolved super property.
2680 /// That is, [rhs] is only evaluated and assigned, if the value of the 2109 /// That is, [rhs] is only evaluated and assigned, if the value of the
2681 /// unresolved property is `null`. The behavior is thus equivalent to a no 2110 /// unresolved property is `null`. The behavior is thus equivalent to a no
2682 /// such method error. 2111 /// such method error.
2683 /// 2112 ///
2684 /// For instance: 2113 /// For instance:
2685 /// 2114 ///
2686 /// class B { 2115 /// class B {
2687 /// } 2116 /// }
2688 /// class C extends B { 2117 /// class C extends B {
2689 /// m(rhs) => super.unresolved ??= rhs; 2118 /// m(rhs) => super.unresolved ??= rhs;
2690 /// } 2119 /// }
2691 /// 2120 ///
2692 R visitUnresolvedSuperSetIfNull( 2121 R visitUnresolvedSuperSetIfNull(Send node, Element element, Node rhs, A arg);
2693 Send node,
2694 Element element,
2695 Node rhs,
2696 A arg);
2697 2122
2698 /// If-null assignment expression of [rhs] to the static property defined 2123 /// If-null assignment expression of [rhs] to the static property defined
2699 /// by [setter] with no corresponding getter. That is, [rhs] is only evaluated 2124 /// by [setter] with no corresponding getter. That is, [rhs] is only evaluated
2700 /// and assigned to the [setter], if the value of the unresolved 2125 /// and assigned to the [setter], if the value of the unresolved
2701 /// getter is `null`. The behavior is thus equivalent to a no such method 2126 /// getter is `null`. The behavior is thus equivalent to a no such method
2702 /// error. 2127 /// error.
2703 /// 2128 ///
2704 /// For instance: 2129 /// For instance:
2705 /// 2130 ///
2706 /// class C { 2131 /// class C {
2707 /// set foo(_) {} 2132 /// set foo(_) {}
2708 /// } 2133 /// }
2709 /// m1() => C.foo ??= 42; 2134 /// m1() => C.foo ??= 42;
2710 /// 2135 ///
2711 R visitUnresolvedStaticGetterSetIfNull( 2136 R visitUnresolvedStaticGetterSetIfNull(
2712 Send node, 2137 Send node, Element element, MethodElement setter, Node rhs, A arg);
2713 Element element,
2714 MethodElement setter,
2715 Node rhs,
2716 A arg);
2717 2138
2718 /// If-null assignment expression of [rhs] to the top level property defined 2139 /// If-null assignment expression of [rhs] to the top level property defined
2719 /// by [setter] with no corresponding getter. That is, [rhs] is only evaluated 2140 /// by [setter] with no corresponding getter. That is, [rhs] is only evaluated
2720 /// and assigned to the [setter], if the value of the unresolved getter is 2141 /// and assigned to the [setter], if the value of the unresolved getter is
2721 /// `null`. The behavior is thus equivalent to a no such method error. 2142 /// `null`. The behavior is thus equivalent to a no such method error.
2722 /// 2143 ///
2723 /// For instance: 2144 /// For instance:
2724 /// 2145 ///
2725 /// set foo(_) {} 2146 /// set foo(_) {}
2726 /// m1() => foo ??= 42; 2147 /// m1() => foo ??= 42;
2727 /// 2148 ///
2728 R visitUnresolvedTopLevelGetterSetIfNull( 2149 R visitUnresolvedTopLevelGetterSetIfNull(
2729 Send node, 2150 Send node, Element element, MethodElement setter, Node rhs, A arg);
2730 Element element,
2731 MethodElement setter,
2732 Node rhs,
2733 A arg);
2734 2151
2735 /// If-null assignment expression of [rhs] to the static property defined 2152 /// If-null assignment expression of [rhs] to the static property defined
2736 /// by [getter] with no corresponding setter. That is, [rhs] is only evaluated 2153 /// by [getter] with no corresponding setter. That is, [rhs] is only evaluated
2737 /// and assigned to the unresolved setter, if the value of the [getter] is 2154 /// and assigned to the unresolved setter, if the value of the [getter] is
2738 /// `null`. 2155 /// `null`.
2739 /// 2156 ///
2740 /// For instance: 2157 /// For instance:
2741 /// 2158 ///
2742 /// class C { 2159 /// class C {
2743 /// get foo => 42; 2160 /// get foo => 42;
2744 /// } 2161 /// }
2745 /// m1() => C.foo ??= 42; 2162 /// m1() => C.foo ??= 42;
2746 /// 2163 ///
2747 R visitUnresolvedStaticSetterSetIfNull( 2164 R visitUnresolvedStaticSetterSetIfNull(
2748 Send node, 2165 Send node, MethodElement getter, Element element, Node rhs, A arg);
2749 MethodElement getter,
2750 Element element,
2751 Node rhs,
2752 A arg);
2753 2166
2754 /// If-null assignment expression of [rhs] to the top level property defined 2167 /// If-null assignment expression of [rhs] to the top level property defined
2755 /// by [getter] with no corresponding setter. That is, [rhs] is only evaluated 2168 /// by [getter] with no corresponding setter. That is, [rhs] is only evaluated
2756 /// and assigned to the unresolved setter, if the value of the [getter] is 2169 /// and assigned to the unresolved setter, if the value of the [getter] is
2757 /// `null`. 2170 /// `null`.
2758 /// 2171 ///
2759 /// For instance: 2172 /// For instance:
2760 /// 2173 ///
2761 /// get foo => 42; 2174 /// get foo => 42;
2762 /// m1() => foo ??= 42; 2175 /// m1() => foo ??= 42;
2763 /// 2176 ///
2764 R visitUnresolvedTopLevelSetterSetIfNull( 2177 R visitUnresolvedTopLevelSetterSetIfNull(
2765 Send node, 2178 Send node, MethodElement getter, Element element, Node rhs, A arg);
2766 MethodElement getter,
2767 Element element,
2768 Node rhs,
2769 A arg);
2770 2179
2771 /// If-null assignment expression of [rhs] to an unresolved property. 2180 /// If-null assignment expression of [rhs] to an unresolved property.
2772 /// That is, [rhs] is only evaluated and assigned, if the value of the 2181 /// That is, [rhs] is only evaluated and assigned, if the value of the
2773 /// unresolved property is `null`. The behavior is thus equivalent to a no 2182 /// unresolved property is `null`. The behavior is thus equivalent to a no
2774 /// such method error. 2183 /// such method error.
2775 /// 2184 ///
2776 /// For instance: 2185 /// For instance:
2777 /// 2186 ///
2778 /// class C {} 2187 /// class C {}
2779 /// m1() => unresolved ??= 42; 2188 /// m1() => unresolved ??= 42;
2780 /// m2() => C.unresolved ??= 42; 2189 /// m2() => C.unresolved ??= 42;
2781 /// 2190 ///
2782 // TODO(johnniwinther): Split the cases in which a prefix is resolved. 2191 // TODO(johnniwinther): Split the cases in which a prefix is resolved.
2783 R visitUnresolvedSetIfNull( 2192 R visitUnresolvedSetIfNull(Send node, Element element, Node rhs, A arg);
2784 Send node,
2785 Element element,
2786 Node rhs,
2787 A arg);
2788 2193
2789 /// If-null assignment expression of [rhs] to an invalid expression. 2194 /// If-null assignment expression of [rhs] to an invalid expression.
2790 /// 2195 ///
2791 /// For instance: 2196 /// For instance:
2792 /// 2197 ///
2793 /// import 'foo.dart' as p; 2198 /// import 'foo.dart' as p;
2794 /// 2199 ///
2795 /// m() => p ??= 42; 2200 /// m() => p ??= 42;
2796 /// 2201 ///
2797 R errorInvalidSetIfNull( 2202 R errorInvalidSetIfNull(Send node, ErroneousElement error, Node rhs, A arg);
2798 Send node,
2799 ErroneousElement error,
2800 Node rhs,
2801 A arg);
2802 2203
2803 /// If-null assignment expression of [rhs] to the class type literal 2204 /// If-null assignment expression of [rhs] to the class type literal
2804 /// [contant]. That is, [rhs] is only evaluated and assigned, if the value 2205 /// [contant]. That is, [rhs] is only evaluated and assigned, if the value
2805 /// is of the [constant] is `null`. The behavior is thus equivalent to a type 2206 /// is of the [constant] is `null`. The behavior is thus equivalent to a type
2806 /// literal access. 2207 /// literal access.
2807 /// 2208 ///
2808 /// For instance: 2209 /// For instance:
2809 /// 2210 ///
2810 /// class C {} 2211 /// class C {}
2811 /// m(rhs) => C ??= rhs; 2212 /// m(rhs) => C ??= rhs;
2812 /// 2213 ///
2813 R visitClassTypeLiteralSetIfNull( 2214 R visitClassTypeLiteralSetIfNull(
2814 Send node, 2215 Send node, ConstantExpression constant, Node rhs, A arg);
2815 ConstantExpression constant,
2816 Node rhs,
2817 A arg);
2818 2216
2819 /// If-null assignment expression of [rhs] to the typedef type literal 2217 /// If-null assignment expression of [rhs] to the typedef type literal
2820 /// [constant]. That is, [rhs] is only evaluated and assigned, if the value 2218 /// [constant]. That is, [rhs] is only evaluated and assigned, if the value
2821 /// is of the [constant] is `null`. The behavior is thus equivalent to a type 2219 /// is of the [constant] is `null`. The behavior is thus equivalent to a type
2822 /// literal access. 2220 /// literal access.
2823 /// 2221 ///
2824 /// For instance: 2222 /// For instance:
2825 /// 2223 ///
2826 /// typedef F(); 2224 /// typedef F();
2827 /// m(rhs) => F ??= rhs; 2225 /// m(rhs) => F ??= rhs;
2828 /// 2226 ///
2829 R visitTypedefTypeLiteralSetIfNull( 2227 R visitTypedefTypeLiteralSetIfNull(
2830 Send node, 2228 Send node, ConstantExpression constant, Node rhs, A arg);
2831 ConstantExpression constant,
2832 Node rhs,
2833 A arg);
2834 2229
2835 /// If-null assignment expression of [rhs] to the type literal for the type 2230 /// If-null assignment expression of [rhs] to the type literal for the type
2836 /// variable [element]. That is, [rhs] is only evaluated and assigned, if 2231 /// variable [element]. That is, [rhs] is only evaluated and assigned, if
2837 /// the value is of the [element] is `null`. The behavior is thus equivalent t o 2232 /// the value is of the [element] is `null`. The behavior is thus equivalent t o
2838 /// a type literal access. 2233 /// a type literal access.
2839 /// 2234 ///
2840 /// For instance: 2235 /// For instance:
2841 /// 2236 ///
2842 /// class C<T> { 2237 /// class C<T> {
2843 /// m(rhs) => T ??= rhs; 2238 /// m(rhs) => T ??= rhs;
2844 /// } 2239 /// }
2845 /// 2240 ///
2846 R visitTypeVariableTypeLiteralSetIfNull( 2241 R visitTypeVariableTypeLiteralSetIfNull(
2847 Send node, 2242 Send node, TypeVariableElement element, Node rhs, A arg);
2848 TypeVariableElement element,
2849 Node rhs,
2850 A arg);
2851 2243
2852 /// If-null assignment expression of [rhs] to the dynamic type literal 2244 /// If-null assignment expression of [rhs] to the dynamic type literal
2853 /// [constant]. That is, [rhs] is only evaluated and assigned, if the value 2245 /// [constant]. That is, [rhs] is only evaluated and assigned, if the value
2854 /// is of the [constant] is `null`. The behavior is thus equivalent to a type 2246 /// is of the [constant] is `null`. The behavior is thus equivalent to a type
2855 /// literal access. 2247 /// literal access.
2856 /// 2248 ///
2857 /// For instance: 2249 /// For instance:
2858 /// 2250 ///
2859 /// m(rhs) => dynamic ??= rhs; 2251 /// m(rhs) => dynamic ??= rhs;
2860 /// 2252 ///
2861 R visitDynamicTypeLiteralSetIfNull( 2253 R visitDynamicTypeLiteralSetIfNull(
2862 Send node, 2254 Send node, ConstantExpression constant, Node rhs, A arg);
2863 ConstantExpression constant,
2864 Node rhs,
2865 A arg);
2866 2255
2867 /// Prefix expression with [operator] on a final super [field]. 2256 /// Prefix expression with [operator] on a final super [field].
2868 /// 2257 ///
2869 /// For instance: 2258 /// For instance:
2870 /// 2259 ///
2871 /// class B { 2260 /// class B {
2872 /// final field = 42; 2261 /// final field = 42;
2873 /// } 2262 /// }
2874 /// class C extends B { 2263 /// class C extends B {
2875 /// m(rhs) => ++super.field; 2264 /// m(rhs) => ++super.field;
2876 /// } 2265 /// }
2877 /// 2266 ///
2878 R visitFinalSuperFieldPrefix( 2267 R visitFinalSuperFieldPrefix(
2879 Send node, 2268 Send node, FieldElement field, IncDecOperator operator, A arg);
2880 FieldElement field,
2881 IncDecOperator operator,
2882 A arg);
2883 2269
2884 /// Prefix expression with [operator] on an unresolved super property. 2270 /// Prefix expression with [operator] on an unresolved super property.
2885 /// 2271 ///
2886 /// For instance: 2272 /// For instance:
2887 /// 2273 ///
2888 /// class B { 2274 /// class B {
2889 /// } 2275 /// }
2890 /// class C extends B { 2276 /// class C extends B {
2891 /// m(rhs) => ++super.unresolved; 2277 /// m(rhs) => ++super.unresolved;
2892 /// } 2278 /// }
2893 /// 2279 ///
2894 R visitUnresolvedSuperPrefix( 2280 R visitUnresolvedSuperPrefix(
2895 Send node, 2281 Send node, Element element, IncDecOperator operator, A arg);
2896 Element element,
2897 IncDecOperator operator,
2898 A arg);
2899 2282
2900 /// Postfix expression with [operator] on an unresolved super property. 2283 /// Postfix expression with [operator] on an unresolved super property.
2901 /// 2284 ///
2902 /// For instance: 2285 /// For instance:
2903 /// 2286 ///
2904 /// class B { 2287 /// class B {
2905 /// } 2288 /// }
2906 /// class C extends B { 2289 /// class C extends B {
2907 /// m(rhs) => super.unresolved++; 2290 /// m(rhs) => super.unresolved++;
2908 /// } 2291 /// }
2909 /// 2292 ///
2910 R visitUnresolvedSuperPostfix( 2293 R visitUnresolvedSuperPostfix(
2911 Send node, 2294 Send node, Element element, IncDecOperator operator, A arg);
2912 Element element,
2913 IncDecOperator operator,
2914 A arg);
2915 2295
2916 /// Compound assignment expression of [rhs] with [operator] on an unresolved 2296 /// Compound assignment expression of [rhs] with [operator] on an unresolved
2917 /// super property. 2297 /// super property.
2918 /// 2298 ///
2919 /// For instance: 2299 /// For instance:
2920 /// 2300 ///
2921 /// class B { 2301 /// class B {
2922 /// } 2302 /// }
2923 /// class C extends B { 2303 /// class C extends B {
2924 /// m(rhs) => super.unresolved += rhs; 2304 /// m(rhs) => super.unresolved += rhs;
2925 /// } 2305 /// }
2926 /// 2306 ///
2927 R visitUnresolvedSuperCompound( 2307 R visitUnresolvedSuperCompound(
2928 Send node, 2308 Send node, Element element, AssignmentOperator operator, Node rhs, A arg);
2929 Element element,
2930 AssignmentOperator operator,
2931 Node rhs,
2932 A arg);
2933 2309
2934 /// Postfix expression with [operator] on a final super [field]. 2310 /// Postfix expression with [operator] on a final super [field].
2935 /// 2311 ///
2936 /// For instance: 2312 /// For instance:
2937 /// 2313 ///
2938 /// class B { 2314 /// class B {
2939 /// final field = 42; 2315 /// final field = 42;
2940 /// } 2316 /// }
2941 /// class C extends B { 2317 /// class C extends B {
2942 /// m(rhs) => super.field++; 2318 /// m(rhs) => super.field++;
2943 /// } 2319 /// }
2944 /// 2320 ///
2945 R visitFinalSuperFieldPostfix( 2321 R visitFinalSuperFieldPostfix(
2946 Send node, 2322 Send node, FieldElement field, IncDecOperator operator, A arg);
2947 FieldElement field,
2948 IncDecOperator operator,
2949 A arg);
2950 2323
2951 /// Compound assignment expression of [rhs] with [operator] reading from the 2324 /// Compound assignment expression of [rhs] with [operator] reading from the
2952 /// super field [readField] and writing to the different super field 2325 /// super field [readField] and writing to the different super field
2953 /// [writtenField]. 2326 /// [writtenField].
2954 /// 2327 ///
2955 /// For instance: 2328 /// For instance:
2956 /// 2329 ///
2957 /// class A { 2330 /// class A {
2958 /// var field; 2331 /// var field;
2959 /// } 2332 /// }
2960 /// class B extends A { 2333 /// class B extends A {
2961 /// final field; 2334 /// final field;
2962 /// } 2335 /// }
2963 /// class C extends B { 2336 /// class C extends B {
2964 /// m() => super.field += rhs; 2337 /// m() => super.field += rhs;
2965 /// } 2338 /// }
2966 /// 2339 ///
2967 R visitSuperFieldFieldCompound( 2340 R visitSuperFieldFieldCompound(Send node, FieldElement readField,
2968 Send node, 2341 FieldElement writtenField, AssignmentOperator operator, Node rhs, A arg);
2969 FieldElement readField,
2970 FieldElement writtenField,
2971 AssignmentOperator operator,
2972 Node rhs,
2973 A arg);
2974 2342
2975 /// Compound assignment expression of [rhs] with [operator] reading from a 2343 /// Compound assignment expression of [rhs] with [operator] reading from a
2976 /// super [getter] and writing to a super [setter]. 2344 /// super [getter] and writing to a super [setter].
2977 /// 2345 ///
2978 /// For instance: 2346 /// For instance:
2979 /// 2347 ///
2980 /// class B { 2348 /// class B {
2981 /// get o => 0; 2349 /// get o => 0;
2982 /// set o(_) {} 2350 /// set o(_) {}
2983 /// } 2351 /// }
2984 /// class C extends B { 2352 /// class C extends B {
2985 /// m(rhs) => super.o += rhs; 2353 /// m(rhs) => super.o += rhs;
2986 /// } 2354 /// }
2987 /// 2355 ///
2988 R visitSuperGetterSetterCompound( 2356 R visitSuperGetterSetterCompound(Send node, FunctionElement getter,
2989 Send node, 2357 FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
2990 FunctionElement getter,
2991 FunctionElement setter,
2992 AssignmentOperator operator,
2993 Node rhs,
2994 A arg);
2995 2358
2996 /// Compound assignment expression of [rhs] with [operator] reading from a 2359 /// Compound assignment expression of [rhs] with [operator] reading from a
2997 /// super [method], that is, closurizing [method], and writing to a super 2360 /// super [method], that is, closurizing [method], and writing to a super
2998 /// [setter]. 2361 /// [setter].
2999 /// 2362 ///
3000 /// For instance: 2363 /// For instance:
3001 /// 2364 ///
3002 /// class B { 2365 /// class B {
3003 /// o() {} 2366 /// o() {}
3004 /// set o(_) {} 2367 /// set o(_) {}
3005 /// } 2368 /// }
3006 /// class C extends B { 2369 /// class C extends B {
3007 /// m(rhs) => super.o += rhs; 2370 /// m(rhs) => super.o += rhs;
3008 /// } 2371 /// }
3009 /// 2372 ///
3010 R visitSuperMethodSetterCompound( 2373 R visitSuperMethodSetterCompound(Send node, FunctionElement method,
3011 Send node, 2374 FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
3012 FunctionElement method,
3013 FunctionElement setter,
3014 AssignmentOperator operator,
3015 Node rhs,
3016 A arg);
3017 2375
3018 /// Compound assignment expression of [rhs] with [operator] reading the 2376 /// Compound assignment expression of [rhs] with [operator] reading the
3019 /// closurized super [method] and trying to invoke the non-existing setter. 2377 /// closurized super [method] and trying to invoke the non-existing setter.
3020 /// 2378 ///
3021 /// For instance: 2379 /// For instance:
3022 /// 2380 ///
3023 /// class B { 2381 /// class B {
3024 /// o() {} 2382 /// o() {}
3025 /// } 2383 /// }
3026 /// class C extends B { 2384 /// class C extends B {
3027 /// m(rhs) => super.o += rhs; 2385 /// m(rhs) => super.o += rhs;
3028 /// } 2386 /// }
3029 /// 2387 ///
3030 R visitSuperMethodCompound( 2388 R visitSuperMethodCompound(Send node, FunctionElement method,
3031 Send node, 2389 AssignmentOperator operator, Node rhs, A arg);
3032 FunctionElement method,
3033 AssignmentOperator operator,
3034 Node rhs,
3035 A arg);
3036 2390
3037 /// Compound assignment expression of [rhs] with [operator] reading from the 2391 /// Compound assignment expression of [rhs] with [operator] reading from the
3038 /// non-existing super getter and writing to a super [setter]. 2392 /// non-existing super getter and writing to a super [setter].
3039 /// 2393 ///
3040 /// For instance: 2394 /// For instance:
3041 /// 2395 ///
3042 /// class B { 2396 /// class B {
3043 /// set o(_) {} 2397 /// set o(_) {}
3044 /// } 2398 /// }
3045 /// class C extends B { 2399 /// class C extends B {
3046 /// m(rhs) => super.o += rhs; 2400 /// m(rhs) => super.o += rhs;
3047 /// } 2401 /// }
3048 /// 2402 ///
3049 R visitUnresolvedSuperGetterCompound( 2403 R visitUnresolvedSuperGetterCompound(Send node, Element element,
3050 Send node, 2404 MethodElement setter, AssignmentOperator operator, Node rhs, A arg);
3051 Element element,
3052 MethodElement setter,
3053 AssignmentOperator operator,
3054 Node rhs,
3055 A arg);
3056 2405
3057 /// Compound assignment expression of [rhs] with [operator] reading from a 2406 /// Compound assignment expression of [rhs] with [operator] reading from a
3058 /// super [getter] and writing to the non-existing super setter. 2407 /// super [getter] and writing to the non-existing super setter.
3059 /// 2408 ///
3060 /// For instance: 2409 /// For instance:
3061 /// 2410 ///
3062 /// class B { 2411 /// class B {
3063 /// get o => 42; 2412 /// get o => 42;
3064 /// } 2413 /// }
3065 /// class C extends B { 2414 /// class C extends B {
3066 /// m(rhs) => super.o += rhs; 2415 /// m(rhs) => super.o += rhs;
3067 /// } 2416 /// }
3068 /// 2417 ///
3069 R visitUnresolvedSuperSetterCompound( 2418 R visitUnresolvedSuperSetterCompound(Send node, MethodElement getter,
3070 Send node, 2419 Element element, AssignmentOperator operator, Node rhs, A arg);
3071 MethodElement getter,
3072 Element element,
3073 AssignmentOperator operator,
3074 Node rhs,
3075 A arg);
3076 2420
3077 /// Compound assignment expression of [rhs] with [operator] reading from a 2421 /// Compound assignment expression of [rhs] with [operator] reading from a
3078 /// super [field] and writing to a super [setter]. 2422 /// super [field] and writing to a super [setter].
3079 /// 2423 ///
3080 /// For instance: 2424 /// For instance:
3081 /// 2425 ///
3082 /// class A { 2426 /// class A {
3083 /// var o; 2427 /// var o;
3084 /// } 2428 /// }
3085 /// class B extends A { 2429 /// class B extends A {
3086 /// set o(_) {} 2430 /// set o(_) {}
3087 /// } 2431 /// }
3088 /// class C extends B { 2432 /// class C extends B {
3089 /// m(rhs) => super.o += rhs; 2433 /// m(rhs) => super.o += rhs;
3090 /// } 2434 /// }
3091 /// 2435 ///
3092 R visitSuperFieldSetterCompound( 2436 R visitSuperFieldSetterCompound(Send node, FieldElement field,
3093 Send node, 2437 FunctionElement setter, AssignmentOperator operator, Node rhs, A arg);
3094 FieldElement field,
3095 FunctionElement setter,
3096 AssignmentOperator operator,
3097 Node rhs,
3098 A arg);
3099 2438
3100 /// Compound assignment expression of [rhs] with [operator] reading from a 2439 /// Compound assignment expression of [rhs] with [operator] reading from a
3101 /// super [getter] and writing to a super [field]. 2440 /// super [getter] and writing to a super [field].
3102 /// 2441 ///
3103 /// For instance: 2442 /// For instance:
3104 /// 2443 ///
3105 /// class A { 2444 /// class A {
3106 /// var o; 2445 /// var o;
3107 /// } 2446 /// }
3108 /// class B extends A { 2447 /// class B extends A {
3109 /// get o => 0; 2448 /// get o => 0;
3110 /// } 2449 /// }
3111 /// class C extends B { 2450 /// class C extends B {
3112 /// m(rhs) => super.o += rhs; 2451 /// m(rhs) => super.o += rhs;
3113 /// } 2452 /// }
3114 /// 2453 ///
3115 R visitSuperGetterFieldCompound( 2454 R visitSuperGetterFieldCompound(Send node, FunctionElement getter,
3116 Send node, 2455 FieldElement field, AssignmentOperator operator, Node rhs, A arg);
3117 FunctionElement getter,
3118 FieldElement field,
3119 AssignmentOperator operator,
3120 Node rhs,
3121 A arg);
3122 2456
3123 /// Compound assignment expression of [rhs] with [operator] on a type literal 2457 /// Compound assignment expression of [rhs] with [operator] on a type literal
3124 /// for class [element]. 2458 /// for class [element].
3125 /// 2459 ///
3126 /// For instance: 2460 /// For instance:
3127 /// 2461 ///
3128 /// class C {} 2462 /// class C {}
3129 /// m(rhs) => C += rhs; 2463 /// m(rhs) => C += rhs;
3130 /// 2464 ///
3131 R visitClassTypeLiteralCompound( 2465 R visitClassTypeLiteralCompound(Send node, ConstantExpression constant,
3132 Send node, 2466 AssignmentOperator operator, Node rhs, A arg);
3133 ConstantExpression constant,
3134 AssignmentOperator operator,
3135 Node rhs,
3136 A arg);
3137 2467
3138 /// Compound assignment expression of [rhs] with [operator] on a type literal 2468 /// Compound assignment expression of [rhs] with [operator] on a type literal
3139 /// for typedef [element]. 2469 /// for typedef [element].
3140 /// 2470 ///
3141 /// For instance: 2471 /// For instance:
3142 /// 2472 ///
3143 /// typedef F(); 2473 /// typedef F();
3144 /// m(rhs) => F += rhs; 2474 /// m(rhs) => F += rhs;
3145 /// 2475 ///
3146 R visitTypedefTypeLiteralCompound( 2476 R visitTypedefTypeLiteralCompound(Send node, ConstantExpression constant,
3147 Send node, 2477 AssignmentOperator operator, Node rhs, A arg);
3148 ConstantExpression constant,
3149 AssignmentOperator operator,
3150 Node rhs,
3151 A arg);
3152 2478
3153 /// Compound assignment expression of [rhs] with [operator] on a type literal 2479 /// Compound assignment expression of [rhs] with [operator] on a type literal
3154 /// for type variable [element]. 2480 /// for type variable [element].
3155 /// 2481 ///
3156 /// For instance: 2482 /// For instance:
3157 /// 2483 ///
3158 /// class C<T> { 2484 /// class C<T> {
3159 /// m(rhs) => T += rhs; 2485 /// m(rhs) => T += rhs;
3160 /// } 2486 /// }
3161 /// 2487 ///
3162 R visitTypeVariableTypeLiteralCompound( 2488 R visitTypeVariableTypeLiteralCompound(Send node, TypeVariableElement element,
3163 Send node, 2489 AssignmentOperator operator, Node rhs, A arg);
3164 TypeVariableElement element,
3165 AssignmentOperator operator,
3166 Node rhs,
3167 A arg);
3168 2490
3169 /// Compound assignment expression of [rhs] with [operator] on the type 2491 /// Compound assignment expression of [rhs] with [operator] on the type
3170 /// literal for `dynamic`. 2492 /// literal for `dynamic`.
3171 /// 2493 ///
3172 /// For instance: 2494 /// For instance:
3173 /// 2495 ///
3174 /// m(rhs) => dynamic += rhs; 2496 /// m(rhs) => dynamic += rhs;
3175 /// 2497 ///
3176 R visitDynamicTypeLiteralCompound( 2498 R visitDynamicTypeLiteralCompound(Send node, ConstantExpression constant,
3177 Send node, 2499 AssignmentOperator operator, Node rhs, A arg);
3178 ConstantExpression constant,
3179 AssignmentOperator operator,
3180 Node rhs,
3181 A arg);
3182 2500
3183 /// Compound index assignment of [rhs] with [operator] to [index] on the 2501 /// Compound index assignment of [rhs] with [operator] to [index] on the
3184 /// index operators of [receiver]. 2502 /// index operators of [receiver].
3185 /// 2503 ///
3186 /// For instance: 2504 /// For instance:
3187 /// 2505 ///
3188 /// m(receiver, index, rhs) => receiver[index] += rhs; 2506 /// m(receiver, index, rhs) => receiver[index] += rhs;
3189 /// 2507 ///
3190 R visitCompoundIndexSet( 2508 R visitCompoundIndexSet(SendSet node, Node receiver, Node index,
3191 SendSet node, 2509 AssignmentOperator operator, Node rhs, A arg);
3192 Node receiver,
3193 Node index,
3194 AssignmentOperator operator,
3195 Node rhs,
3196 A arg);
3197 2510
3198 /// Compound index assignment of [rhs] with [operator] to [index] on the index 2511 /// Compound index assignment of [rhs] with [operator] to [index] on the index
3199 /// operators of a super class defined by [getter] and [setter]. 2512 /// operators of a super class defined by [getter] and [setter].
3200 /// 2513 ///
3201 /// For instance: 2514 /// For instance:
3202 /// 2515 ///
3203 /// class B { 2516 /// class B {
3204 /// operator [](index) {} 2517 /// operator [](index) {}
3205 /// operator [](index, value) {} 2518 /// operator [](index, value) {}
3206 /// } 2519 /// }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
3264 /// class where the index getter and setter are undefined. 2577 /// class where the index getter and setter are undefined.
3265 /// 2578 ///
3266 /// For instance: 2579 /// For instance:
3267 /// 2580 ///
3268 /// class B { 2581 /// class B {
3269 /// } 2582 /// }
3270 /// class C extends B { 2583 /// class C extends B {
3271 /// m() => super[1] += 42; 2584 /// m() => super[1] += 42;
3272 /// } 2585 /// }
3273 /// 2586 ///
3274 R visitUnresolvedSuperCompoundIndexSet( 2587 R visitUnresolvedSuperCompoundIndexSet(Send node, Element element, Node index,
3275 Send node, 2588 AssignmentOperator operator, Node rhs, A arg);
3276 Element element,
3277 Node index,
3278 AssignmentOperator operator,
3279 Node rhs,
3280 A arg);
3281 2589
3282 /// If-null assignment expression of [rhs] to [index] on the index operators 2590 /// If-null assignment expression of [rhs] to [index] on the index operators
3283 /// of [receiver]. 2591 /// of [receiver].
3284 /// 2592 ///
3285 /// For instance: 2593 /// For instance:
3286 /// 2594 ///
3287 /// m(receiver, index, rhs) => receiver[index] ??= rhs; 2595 /// m(receiver, index, rhs) => receiver[index] ??= rhs;
3288 /// 2596 ///
3289 R visitIndexSetIfNull( 2597 R visitIndexSetIfNull(
3290 SendSet node, 2598 SendSet node, Node receiver, Node index, Node rhs, A arg);
3291 Node receiver,
3292 Node index,
3293 Node rhs,
3294 A arg);
3295 2599
3296 /// If-null assignment expression of [rhs] to [index] on the index operators 2600 /// If-null assignment expression of [rhs] to [index] on the index operators
3297 /// of a super class defined by [getter] and [setter]. 2601 /// of a super class defined by [getter] and [setter].
3298 /// 2602 ///
3299 /// For instance: 2603 /// For instance:
3300 /// 2604 ///
3301 /// class B { 2605 /// class B {
3302 /// operator [](index) {} 2606 /// operator [](index) {}
3303 /// operator [](index, value) {} 2607 /// operator [](index, value) {}
3304 /// } 2608 /// }
3305 /// class C extends B { 2609 /// class C extends B {
3306 /// m(index, rhs) => super[index] ??= rhs; 2610 /// m(index, rhs) => super[index] ??= rhs;
3307 /// } 2611 /// }
3308 /// 2612 ///
3309 R visitSuperIndexSetIfNull( 2613 R visitSuperIndexSetIfNull(SendSet node, MethodElement getter,
3310 SendSet node, 2614 MethodElement setter, Node index, Node rhs, A arg);
3311 MethodElement getter,
3312 MethodElement setter,
3313 Node index,
3314 Node rhs,
3315 A arg);
3316 2615
3317 /// If-null assignment expression of [rhs] to [index] on a super class where 2616 /// If-null assignment expression of [rhs] to [index] on a super class where
3318 /// the index getter is undefined and the index setter is defined by [setter]. 2617 /// the index getter is undefined and the index setter is defined by [setter].
3319 /// 2618 ///
3320 /// For instance: 2619 /// For instance:
3321 /// 2620 ///
3322 /// class B { 2621 /// class B {
3323 /// operator [](index, value) {} 2622 /// operator [](index, value) {}
3324 /// } 2623 /// }
3325 /// class C extends B { 2624 /// class C extends B {
3326 /// m() => super[1] ??= 42; 2625 /// m() => super[1] ??= 42;
3327 /// } 2626 /// }
3328 /// 2627 ///
3329 R visitUnresolvedSuperGetterIndexSetIfNull( 2628 R visitUnresolvedSuperGetterIndexSetIfNull(Send node, Element element,
3330 Send node, 2629 MethodElement setter, Node index, Node rhs, A arg);
3331 Element element,
3332 MethodElement setter,
3333 Node index,
3334 Node rhs,
3335 A arg);
3336 2630
3337 /// If-null assignment expression of [rhs] to [index] on a super class where 2631 /// If-null assignment expression of [rhs] to [index] on a super class where
3338 /// the index getter is defined by [getter] but the index setter is undefined. 2632 /// the index getter is defined by [getter] but the index setter is undefined.
3339 /// 2633 ///
3340 /// For instance: 2634 /// For instance:
3341 /// 2635 ///
3342 /// class B { 2636 /// class B {
3343 /// operator [](index) => 42; 2637 /// operator [](index) => 42;
3344 /// } 2638 /// }
3345 /// class C extends B { 2639 /// class C extends B {
3346 /// m() => super[1] ??= 42; 2640 /// m() => super[1] ??= 42;
3347 /// } 2641 /// }
3348 /// 2642 ///
3349 R visitUnresolvedSuperSetterIndexSetIfNull( 2643 R visitUnresolvedSuperSetterIndexSetIfNull(Send node, MethodElement getter,
3350 Send node, 2644 Element element, Node index, Node rhs, A arg);
3351 MethodElement getter,
3352 Element element,
3353 Node index,
3354 Node rhs,
3355 A arg);
3356 2645
3357 /// If-null assignment expression of [rhs] to [index] on a super class where 2646 /// If-null assignment expression of [rhs] to [index] on a super class where
3358 /// the index getter and setter are undefined. 2647 /// the index getter and setter are undefined.
3359 /// 2648 ///
3360 /// For instance: 2649 /// For instance:
3361 /// 2650 ///
3362 /// class B { 2651 /// class B {
3363 /// } 2652 /// }
3364 /// class C extends B { 2653 /// class C extends B {
3365 /// m() => super[1] ??= 42; 2654 /// m() => super[1] ??= 42;
3366 /// } 2655 /// }
3367 /// 2656 ///
3368 R visitUnresolvedSuperIndexSetIfNull( 2657 R visitUnresolvedSuperIndexSetIfNull(
3369 Send node, 2658 Send node, Element element, Node index, Node rhs, A arg);
3370 Element element,
3371 Node index,
3372 Node rhs,
3373 A arg);
3374 2659
3375 /// Prefix expression with [operator] of the property on [receiver] whose 2660 /// Prefix expression with [operator] of the property on [receiver] whose
3376 /// getter and setter are defined by [getterSelector] and [setterSelector], 2661 /// getter and setter are defined by [getterSelector] and [setterSelector],
3377 /// respectively. 2662 /// respectively.
3378 /// 2663 ///
3379 /// For instance: 2664 /// For instance:
3380 /// 2665 ///
3381 /// m(receiver) => ++receiver.foo; 2666 /// m(receiver) => ++receiver.foo;
3382 /// 2667 ///
3383 R visitDynamicPropertyPrefix( 2668 R visitDynamicPropertyPrefix(
3384 Send node, 2669 Send node, Node receiver, Name name, IncDecOperator operator, A arg);
3385 Node receiver,
3386 Name name,
3387 IncDecOperator operator,
3388 A arg);
3389 2670
3390 /// Prefix expression with [operator] of the property on a possibly null 2671 /// Prefix expression with [operator] of the property on a possibly null
3391 /// [receiver] whose getter and setter are defined by [getterSelector] and 2672 /// [receiver] whose getter and setter are defined by [getterSelector] and
3392 /// [setterSelector], respectively. 2673 /// [setterSelector], respectively.
3393 /// 2674 ///
3394 /// For instance: 2675 /// For instance:
3395 /// 2676 ///
3396 /// m(receiver) => ++receiver?.foo; 2677 /// m(receiver) => ++receiver?.foo;
3397 /// 2678 ///
3398 R visitIfNotNullDynamicPropertyPrefix( 2679 R visitIfNotNullDynamicPropertyPrefix(
3399 Send node, 2680 Send node, Node receiver, Name name, IncDecOperator operator, A arg);
3400 Node receiver,
3401 Name name,
3402 IncDecOperator operator,
3403 A arg);
3404 2681
3405 /// Prefix expression with [operator] on a [parameter]. 2682 /// Prefix expression with [operator] on a [parameter].
3406 /// 2683 ///
3407 /// For instance: 2684 /// For instance:
3408 /// 2685 ///
3409 /// m(parameter) => ++parameter; 2686 /// m(parameter) => ++parameter;
3410 /// 2687 ///
3411 R visitParameterPrefix( 2688 R visitParameterPrefix(
3412 Send node, 2689 Send node, ParameterElement parameter, IncDecOperator operator, A arg);
3413 ParameterElement parameter,
3414 IncDecOperator operator,
3415 A arg);
3416 2690
3417 /// Prefix expression with [operator] on a final [parameter]. 2691 /// Prefix expression with [operator] on a final [parameter].
3418 /// 2692 ///
3419 /// For instance: 2693 /// For instance:
3420 /// 2694 ///
3421 /// m(final parameter) => ++parameter; 2695 /// m(final parameter) => ++parameter;
3422 /// 2696 ///
3423 R visitFinalParameterPrefix( 2697 R visitFinalParameterPrefix(
3424 Send node, 2698 Send node, ParameterElement parameter, IncDecOperator operator, A arg);
3425 ParameterElement parameter,
3426 IncDecOperator operator,
3427 A arg);
3428 2699
3429 /// Prefix expression with [operator] on a local [variable]. 2700 /// Prefix expression with [operator] on a local [variable].
3430 /// 2701 ///
3431 /// For instance: 2702 /// For instance:
3432 /// 2703 ///
3433 /// m() { 2704 /// m() {
3434 /// var variable; 2705 /// var variable;
3435 /// ++variable; 2706 /// ++variable;
3436 /// } 2707 /// }
3437 /// 2708 ///
3438 R visitLocalVariablePrefix( 2709 R visitLocalVariablePrefix(
3439 Send node, 2710 Send node, LocalVariableElement variable, IncDecOperator operator, A arg);
3440 LocalVariableElement variable,
3441 IncDecOperator operator,
3442 A arg);
3443 2711
3444 /// Prefix expression with [operator] on a final local [variable]. 2712 /// Prefix expression with [operator] on a final local [variable].
3445 /// 2713 ///
3446 /// For instance: 2714 /// For instance:
3447 /// 2715 ///
3448 /// m() { 2716 /// m() {
3449 /// final variable; 2717 /// final variable;
3450 /// ++variable; 2718 /// ++variable;
3451 /// } 2719 /// }
3452 /// 2720 ///
3453 R visitFinalLocalVariablePrefix( 2721 R visitFinalLocalVariablePrefix(
3454 Send node, 2722 Send node, LocalVariableElement variable, IncDecOperator operator, A arg);
3455 LocalVariableElement variable,
3456 IncDecOperator operator,
3457 A arg);
3458 2723
3459 /// Prefix expression with [operator] on a local [function]. 2724 /// Prefix expression with [operator] on a local [function].
3460 /// 2725 ///
3461 /// For instance: 2726 /// For instance:
3462 /// 2727 ///
3463 /// m() { 2728 /// m() {
3464 /// function() {} 2729 /// function() {}
3465 /// ++function; 2730 /// ++function;
3466 /// } 2731 /// }
3467 /// 2732 ///
3468 R visitLocalFunctionPrefix( 2733 R visitLocalFunctionPrefix(
3469 Send node, 2734 Send node, LocalFunctionElement function, IncDecOperator operator, A arg);
3470 LocalFunctionElement function,
3471 IncDecOperator operator,
3472 A arg);
3473
3474 2735
3475 /// Prefix expression with [operator] of the property on `this` whose getter 2736 /// Prefix expression with [operator] of the property on `this` whose getter
3476 /// and setter are defined by [getterSelector] and [setterSelector], 2737 /// and setter are defined by [getterSelector] and [setterSelector],
3477 /// respectively. 2738 /// respectively.
3478 /// 2739 ///
3479 /// For instance: 2740 /// For instance:
3480 /// 2741 ///
3481 /// class C { 2742 /// class C {
3482 /// m() => ++foo; 2743 /// m() => ++foo;
3483 /// } 2744 /// }
3484 /// 2745 ///
3485 /// or 2746 /// or
3486 /// 2747 ///
3487 /// class C { 2748 /// class C {
3488 /// m() => ++this.foo; 2749 /// m() => ++this.foo;
3489 /// } 2750 /// }
3490 /// 2751 ///
3491 R visitThisPropertyPrefix( 2752 R visitThisPropertyPrefix(
3492 Send node, 2753 Send node, Name name, IncDecOperator operator, A arg);
3493 Name name,
3494 IncDecOperator operator,
3495 A arg);
3496 2754
3497 /// Prefix expression with [operator] on a static [field]. 2755 /// Prefix expression with [operator] on a static [field].
3498 /// 2756 ///
3499 /// For instance: 2757 /// For instance:
3500 /// 2758 ///
3501 /// class C { 2759 /// class C {
3502 /// static var field; 2760 /// static var field;
3503 /// m() => ++field; 2761 /// m() => ++field;
3504 /// } 2762 /// }
3505 /// 2763 ///
3506 R visitStaticFieldPrefix( 2764 R visitStaticFieldPrefix(
3507 Send node, 2765 Send node, FieldElement field, IncDecOperator operator, A arg);
3508 FieldElement field,
3509 IncDecOperator operator,
3510 A arg);
3511 2766
3512 /// Prefix expression with [operator] on a final static [field]. 2767 /// Prefix expression with [operator] on a final static [field].
3513 /// 2768 ///
3514 /// For instance: 2769 /// For instance:
3515 /// 2770 ///
3516 /// class C { 2771 /// class C {
3517 /// static final field = 42; 2772 /// static final field = 42;
3518 /// m() => ++field; 2773 /// m() => ++field;
3519 /// } 2774 /// }
3520 /// 2775 ///
3521 R visitFinalStaticFieldPrefix( 2776 R visitFinalStaticFieldPrefix(
3522 Send node, 2777 Send node, FieldElement field, IncDecOperator operator, A arg);
3523 FieldElement field,
3524 IncDecOperator operator,
3525 A arg);
3526 2778
3527 /// Prefix expression with [operator] reading from a static [getter] and 2779 /// Prefix expression with [operator] reading from a static [getter] and
3528 /// writing to a static [setter]. 2780 /// writing to a static [setter].
3529 /// 2781 ///
3530 /// For instance: 2782 /// For instance:
3531 /// 2783 ///
3532 /// class C { 2784 /// class C {
3533 /// static get o => 0; 2785 /// static get o => 0;
3534 /// static set o(_) {} 2786 /// static set o(_) {}
3535 /// m() => ++o; 2787 /// m() => ++o;
3536 /// } 2788 /// }
3537 /// 2789 ///
3538 R visitStaticGetterSetterPrefix( 2790 R visitStaticGetterSetterPrefix(Send node, FunctionElement getter,
3539 Send node, 2791 FunctionElement setter, IncDecOperator operator, A arg);
3540 FunctionElement getter,
3541 FunctionElement setter,
3542 IncDecOperator operator,
3543 A arg);
3544
3545 2792
3546 /// Prefix expression with [operator] reading from a static [method], that is, 2793 /// Prefix expression with [operator] reading from a static [method], that is,
3547 /// closurizing [method], and writing to a static [setter]. 2794 /// closurizing [method], and writing to a static [setter].
3548 /// 2795 ///
3549 /// For instance: 2796 /// For instance:
3550 /// 2797 ///
3551 /// class C { 2798 /// class C {
3552 /// static o() {} 2799 /// static o() {}
3553 /// static set o(_) {} 2800 /// static set o(_) {}
3554 /// m() => ++o; 2801 /// m() => ++o;
3555 /// } 2802 /// }
3556 /// 2803 ///
3557 R visitStaticMethodSetterPrefix( 2804 R visitStaticMethodSetterPrefix(Send node, FunctionElement getter,
3558 Send node, 2805 FunctionElement setter, IncDecOperator operator, A arg);
3559 FunctionElement getter,
3560 FunctionElement setter,
3561 IncDecOperator operator,
3562 A arg);
3563 2806
3564 /// Prefix expression with [operator] on a top level [field]. 2807 /// Prefix expression with [operator] on a top level [field].
3565 /// 2808 ///
3566 /// For instance: 2809 /// For instance:
3567 /// 2810 ///
3568 /// var field; 2811 /// var field;
3569 /// m() => ++field; 2812 /// m() => ++field;
3570 /// 2813 ///
3571 R visitTopLevelFieldPrefix( 2814 R visitTopLevelFieldPrefix(
3572 Send node, 2815 Send node, FieldElement field, IncDecOperator operator, A arg);
3573 FieldElement field,
3574 IncDecOperator operator,
3575 A arg);
3576 2816
3577 /// Prefix expression with [operator] on a final top level [field]. 2817 /// Prefix expression with [operator] on a final top level [field].
3578 /// 2818 ///
3579 /// For instance: 2819 /// For instance:
3580 /// 2820 ///
3581 /// final field; 2821 /// final field;
3582 /// m() => ++field; 2822 /// m() => ++field;
3583 /// 2823 ///
3584 R visitFinalTopLevelFieldPrefix( 2824 R visitFinalTopLevelFieldPrefix(
3585 Send node, 2825 Send node, FieldElement field, IncDecOperator operator, A arg);
3586 FieldElement field,
3587 IncDecOperator operator,
3588 A arg);
3589 2826
3590 /// Prefix expression with [operator] reading from a top level [getter] and 2827 /// Prefix expression with [operator] reading from a top level [getter] and
3591 /// writing to a top level [setter]. 2828 /// writing to a top level [setter].
3592 /// 2829 ///
3593 /// For instance: 2830 /// For instance:
3594 /// 2831 ///
3595 /// get o => 0; 2832 /// get o => 0;
3596 /// set o(_) {} 2833 /// set o(_) {}
3597 /// m() => ++o; 2834 /// m() => ++o;
3598 /// 2835 ///
3599 R visitTopLevelGetterSetterPrefix( 2836 R visitTopLevelGetterSetterPrefix(Send node, FunctionElement getter,
3600 Send node, 2837 FunctionElement setter, IncDecOperator operator, A arg);
3601 FunctionElement getter,
3602 FunctionElement setter,
3603 IncDecOperator operator,
3604 A arg);
3605 2838
3606 /// Prefix expression with [operator] reading from a top level [method], that 2839 /// Prefix expression with [operator] reading from a top level [method], that
3607 /// is, closurizing [method], and writing to a top level [setter]. 2840 /// is, closurizing [method], and writing to a top level [setter].
3608 /// 2841 ///
3609 /// For instance: 2842 /// For instance:
3610 /// 2843 ///
3611 /// o() {} 2844 /// o() {}
3612 /// set o(_) {} 2845 /// set o(_) {}
3613 /// m() => ++o; 2846 /// m() => ++o;
3614 /// 2847 ///
3615 R visitTopLevelMethodSetterPrefix( 2848 R visitTopLevelMethodSetterPrefix(Send node, FunctionElement method,
3616 Send node, 2849 FunctionElement setter, IncDecOperator operator, A arg);
3617 FunctionElement method,
3618 FunctionElement setter,
3619 IncDecOperator operator,
3620 A arg);
3621 2850
3622 /// Prefix expression with [operator] on a super [field]. 2851 /// Prefix expression with [operator] on a super [field].
3623 /// 2852 ///
3624 /// For instance: 2853 /// For instance:
3625 /// 2854 ///
3626 /// class B { 2855 /// class B {
3627 /// var field; 2856 /// var field;
3628 /// } 2857 /// }
3629 /// class C extends B { 2858 /// class C extends B {
3630 /// m() => ++super.field; 2859 /// m() => ++super.field;
3631 /// } 2860 /// }
3632 /// 2861 ///
3633 R visitSuperFieldPrefix( 2862 R visitSuperFieldPrefix(
3634 Send node, 2863 Send node, FieldElement field, IncDecOperator operator, A arg);
3635 FieldElement field,
3636 IncDecOperator operator,
3637 A arg);
3638 2864
3639 /// Prefix expression with [operator] reading from the super field [readField] 2865 /// Prefix expression with [operator] reading from the super field [readField]
3640 /// and writing to the different super field [writtenField]. 2866 /// and writing to the different super field [writtenField].
3641 /// 2867 ///
3642 /// For instance: 2868 /// For instance:
3643 /// 2869 ///
3644 /// class A { 2870 /// class A {
3645 /// var field; 2871 /// var field;
3646 /// } 2872 /// }
3647 /// class B extends A { 2873 /// class B extends A {
3648 /// final field; 2874 /// final field;
3649 /// } 2875 /// }
3650 /// class C extends B { 2876 /// class C extends B {
3651 /// m() => ++super.field; 2877 /// m() => ++super.field;
3652 /// } 2878 /// }
3653 /// 2879 ///
3654 R visitSuperFieldFieldPrefix( 2880 R visitSuperFieldFieldPrefix(Send node, FieldElement readField,
3655 Send node, 2881 FieldElement writtenField, IncDecOperator operator, A arg);
3656 FieldElement readField,
3657 FieldElement writtenField,
3658 IncDecOperator operator,
3659 A arg);
3660 2882
3661 /// Prefix expression with [operator] reading from a super [field] and writing 2883 /// Prefix expression with [operator] reading from a super [field] and writing
3662 /// to a super [setter]. 2884 /// to a super [setter].
3663 /// 2885 ///
3664 /// For instance: 2886 /// For instance:
3665 /// 2887 ///
3666 /// class A { 2888 /// class A {
3667 /// var field; 2889 /// var field;
3668 /// } 2890 /// }
3669 /// class B extends A { 2891 /// class B extends A {
3670 /// set field(_) {} 2892 /// set field(_) {}
3671 /// } 2893 /// }
3672 /// class C extends B { 2894 /// class C extends B {
3673 /// m() => ++super.field; 2895 /// m() => ++super.field;
3674 /// } 2896 /// }
3675 /// 2897 ///
3676 R visitSuperFieldSetterPrefix( 2898 R visitSuperFieldSetterPrefix(Send node, FieldElement field,
3677 Send node, 2899 FunctionElement setter, IncDecOperator operator, A arg);
3678 FieldElement field,
3679 FunctionElement setter,
3680 IncDecOperator operator,
3681 A arg);
3682
3683 2900
3684 /// Prefix expression with [operator] reading from a super [getter] and 2901 /// Prefix expression with [operator] reading from a super [getter] and
3685 /// writing to a super [setter]. 2902 /// writing to a super [setter].
3686 /// 2903 ///
3687 /// For instance: 2904 /// For instance:
3688 /// 2905 ///
3689 /// class B { 2906 /// class B {
3690 /// get field => 0; 2907 /// get field => 0;
3691 /// set field(_) {} 2908 /// set field(_) {}
3692 /// } 2909 /// }
3693 /// class C extends B { 2910 /// class C extends B {
3694 /// m() => ++super.field; 2911 /// m() => ++super.field;
3695 /// } 2912 /// }
3696 /// 2913 ///
3697 R visitSuperGetterSetterPrefix( 2914 R visitSuperGetterSetterPrefix(Send node, FunctionElement getter,
3698 Send node, 2915 FunctionElement setter, IncDecOperator operator, A arg);
3699 FunctionElement getter,
3700 FunctionElement setter,
3701 IncDecOperator operator,
3702 A arg);
3703 2916
3704 /// Prefix expression with [operator] reading from a super [getter] and 2917 /// Prefix expression with [operator] reading from a super [getter] and
3705 /// writing to a super [field]. 2918 /// writing to a super [field].
3706 /// 2919 ///
3707 /// For instance: 2920 /// For instance:
3708 /// 2921 ///
3709 /// class A { 2922 /// class A {
3710 /// var field; 2923 /// var field;
3711 /// } 2924 /// }
3712 /// class B extends A { 2925 /// class B extends A {
3713 /// get field => 0; 2926 /// get field => 0;
3714 /// } 2927 /// }
3715 /// class C extends B { 2928 /// class C extends B {
3716 /// m() => ++super.field; 2929 /// m() => ++super.field;
3717 /// } 2930 /// }
3718 /// 2931 ///
3719 R visitSuperGetterFieldPrefix( 2932 R visitSuperGetterFieldPrefix(Send node, FunctionElement getter,
3720 Send node, 2933 FieldElement field, IncDecOperator operator, A arg);
3721 FunctionElement getter,
3722 FieldElement field,
3723 IncDecOperator operator,
3724 A arg);
3725 2934
3726 /// Prefix expression with [operator] reading from a super [method], that is, 2935 /// Prefix expression with [operator] reading from a super [method], that is,
3727 /// closurizing [method], and writing to a super [setter]. 2936 /// closurizing [method], and writing to a super [setter].
3728 /// 2937 ///
3729 /// For instance: 2938 /// For instance:
3730 /// 2939 ///
3731 /// class B { 2940 /// class B {
3732 /// o() {} 2941 /// o() {}
3733 /// set o(_) {} 2942 /// set o(_) {}
3734 /// } 2943 /// }
3735 /// class C extends B { 2944 /// class C extends B {
3736 /// m() => ++super.o; 2945 /// m() => ++super.o;
3737 /// } 2946 /// }
3738 /// 2947 ///
3739 R visitSuperMethodSetterPrefix( 2948 R visitSuperMethodSetterPrefix(Send node, FunctionElement method,
3740 Send node, 2949 FunctionElement setter, IncDecOperator operator, A arg);
3741 FunctionElement method,
3742 FunctionElement setter,
3743 IncDecOperator operator,
3744 A arg);
3745 2950
3746 /// Prefix expression with [operator] reading from a super [method], that is, 2951 /// Prefix expression with [operator] reading from a super [method], that is,
3747 /// closurizing [method], and writing to an unresolved super setter. 2952 /// closurizing [method], and writing to an unresolved super setter.
3748 /// 2953 ///
3749 /// For instance: 2954 /// For instance:
3750 /// 2955 ///
3751 /// class B { 2956 /// class B {
3752 /// o() {} 2957 /// o() {}
3753 /// set o(_) {} 2958 /// set o(_) {}
3754 /// } 2959 /// }
3755 /// class C extends B { 2960 /// class C extends B {
3756 /// m() => ++super.o; 2961 /// m() => ++super.o;
3757 /// } 2962 /// }
3758 /// 2963 ///
3759 R visitSuperMethodPrefix( 2964 R visitSuperMethodPrefix(
3760 Send node, 2965 Send node, FunctionElement method, IncDecOperator operator, A arg);
3761 FunctionElement method,
3762 IncDecOperator operator,
3763 A arg);
3764 2966
3765 /// Prefix expression with [operator] reading from an unresolved super getter 2967 /// Prefix expression with [operator] reading from an unresolved super getter
3766 /// and writing to a super [setter]. 2968 /// and writing to a super [setter].
3767 /// 2969 ///
3768 /// For instance: 2970 /// For instance:
3769 /// 2971 ///
3770 /// class B { 2972 /// class B {
3771 /// set o(_) {} 2973 /// set o(_) {}
3772 /// } 2974 /// }
3773 /// class C extends B { 2975 /// class C extends B {
3774 /// m() => ++super.o; 2976 /// m() => ++super.o;
3775 /// } 2977 /// }
3776 /// 2978 ///
3777 /// 2979 ///
3778 R visitUnresolvedSuperGetterPrefix( 2980 R visitUnresolvedSuperGetterPrefix(Send node, Element element,
3779 Send node, 2981 MethodElement setter, IncDecOperator operator, A arg);
3780 Element element,
3781 MethodElement setter,
3782 IncDecOperator operator,
3783 A arg);
3784 2982
3785 /// Prefix expression with [operator] reading from a super [getter] and 2983 /// Prefix expression with [operator] reading from a super [getter] and
3786 /// writing to an unresolved super setter. 2984 /// writing to an unresolved super setter.
3787 /// 2985 ///
3788 /// For instance: 2986 /// For instance:
3789 /// 2987 ///
3790 /// class B { 2988 /// class B {
3791 /// get o => 42 2989 /// get o => 42
3792 /// } 2990 /// }
3793 /// class C extends B { 2991 /// class C extends B {
3794 /// m() => ++super.o; 2992 /// m() => ++super.o;
3795 /// } 2993 /// }
3796 /// 2994 ///
3797 /// 2995 ///
3798 R visitUnresolvedSuperSetterPrefix( 2996 R visitUnresolvedSuperSetterPrefix(Send node, MethodElement getter,
3799 Send node, 2997 Element element, IncDecOperator operator, A arg);
3800 MethodElement getter,
3801 Element element,
3802 IncDecOperator operator,
3803 A arg);
3804 2998
3805 /// Prefix expression with [operator] on a type literal for a class [element]. 2999 /// Prefix expression with [operator] on a type literal for a class [element].
3806 /// 3000 ///
3807 /// For instance: 3001 /// For instance:
3808 /// 3002 ///
3809 /// class C {} 3003 /// class C {}
3810 /// m() => ++C; 3004 /// m() => ++C;
3811 /// 3005 ///
3812 R visitClassTypeLiteralPrefix( 3006 R visitClassTypeLiteralPrefix(
3813 Send node, 3007 Send node, ConstantExpression constant, IncDecOperator operator, A arg);
3814 ConstantExpression constant,
3815 IncDecOperator operator,
3816 A arg);
3817 3008
3818 /// Prefix expression with [operator] on a type literal for a typedef 3009 /// Prefix expression with [operator] on a type literal for a typedef
3819 /// [element]. 3010 /// [element].
3820 /// 3011 ///
3821 /// For instance: 3012 /// For instance:
3822 /// 3013 ///
3823 /// typedef F(); 3014 /// typedef F();
3824 /// m() => ++F; 3015 /// m() => ++F;
3825 /// 3016 ///
3826 R visitTypedefTypeLiteralPrefix( 3017 R visitTypedefTypeLiteralPrefix(
3827 Send node, 3018 Send node, ConstantExpression constant, IncDecOperator operator, A arg);
3828 ConstantExpression constant,
3829 IncDecOperator operator,
3830 A arg);
3831 3019
3832 /// Prefix expression with [operator] on a type literal for a type variable 3020 /// Prefix expression with [operator] on a type literal for a type variable
3833 /// [element]. 3021 /// [element].
3834 /// 3022 ///
3835 /// For instance: 3023 /// For instance:
3836 /// 3024 ///
3837 /// class C<T> { 3025 /// class C<T> {
3838 /// m() => ++T; 3026 /// m() => ++T;
3839 /// } 3027 /// }
3840 /// 3028 ///
3841 R visitTypeVariableTypeLiteralPrefix( 3029 R visitTypeVariableTypeLiteralPrefix(
3842 Send node, 3030 Send node, TypeVariableElement element, IncDecOperator operator, A arg);
3843 TypeVariableElement element,
3844 IncDecOperator operator,
3845 A arg);
3846 3031
3847 /// Prefix expression with [operator] on the type literal for `dynamic`. 3032 /// Prefix expression with [operator] on the type literal for `dynamic`.
3848 /// 3033 ///
3849 /// For instance: 3034 /// For instance:
3850 /// 3035 ///
3851 /// m() => ++dynamic; 3036 /// m() => ++dynamic;
3852 /// 3037 ///
3853 R visitDynamicTypeLiteralPrefix( 3038 R visitDynamicTypeLiteralPrefix(
3854 Send node, 3039 Send node, ConstantExpression constant, IncDecOperator operator, A arg);
3855 ConstantExpression constant,
3856 IncDecOperator operator,
3857 A arg);
3858 3040
3859 /// Postfix expression with [operator] of the property on [receiver] whose 3041 /// Postfix expression with [operator] of the property on [receiver] whose
3860 /// getter and setter are defined by [getterSelector] and [setterSelector], 3042 /// getter and setter are defined by [getterSelector] and [setterSelector],
3861 /// respectively. 3043 /// respectively.
3862 /// 3044 ///
3863 /// For instance: 3045 /// For instance:
3864 /// 3046 ///
3865 /// m(receiver) => receiver.foo++; 3047 /// m(receiver) => receiver.foo++;
3866 /// 3048 ///
3867 R visitDynamicPropertyPostfix( 3049 R visitDynamicPropertyPostfix(
3868 Send node, 3050 Send node, Node receiver, Name name, IncDecOperator operator, A arg);
3869 Node receiver,
3870 Name name,
3871 IncDecOperator operator,
3872 A arg);
3873 3051
3874 /// Postfix expression with [operator] of the property on a possibly null 3052 /// Postfix expression with [operator] of the property on a possibly null
3875 /// [receiver] whose getter and setter are defined by [getterSelector] and 3053 /// [receiver] whose getter and setter are defined by [getterSelector] and
3876 /// [setterSelector], respectively. 3054 /// [setterSelector], respectively.
3877 /// 3055 ///
3878 /// For instance: 3056 /// For instance:
3879 /// 3057 ///
3880 /// m(receiver) => receiver?.foo++; 3058 /// m(receiver) => receiver?.foo++;
3881 /// 3059 ///
3882 R visitIfNotNullDynamicPropertyPostfix( 3060 R visitIfNotNullDynamicPropertyPostfix(
3883 Send node, 3061 Send node, Node receiver, Name name, IncDecOperator operator, A arg);
3884 Node receiver,
3885 Name name,
3886 IncDecOperator operator,
3887 A arg);
3888 3062
3889 /// Postfix expression with [operator] on a [parameter]. 3063 /// Postfix expression with [operator] on a [parameter].
3890 /// 3064 ///
3891 /// For instance: 3065 /// For instance:
3892 /// 3066 ///
3893 /// m(parameter) => parameter++; 3067 /// m(parameter) => parameter++;
3894 /// 3068 ///
3895 R visitParameterPostfix( 3069 R visitParameterPostfix(
3896 Send node, 3070 Send node, ParameterElement parameter, IncDecOperator operator, A arg);
3897 ParameterElement parameter,
3898 IncDecOperator operator,
3899 A arg);
3900 3071
3901 /// Postfix expression with [operator] on a final [parameter]. 3072 /// Postfix expression with [operator] on a final [parameter].
3902 /// 3073 ///
3903 /// For instance: 3074 /// For instance:
3904 /// 3075 ///
3905 /// m(final parameter) => parameter++; 3076 /// m(final parameter) => parameter++;
3906 /// 3077 ///
3907 R visitFinalParameterPostfix( 3078 R visitFinalParameterPostfix(
3908 Send node, 3079 Send node, ParameterElement parameter, IncDecOperator operator, A arg);
3909 ParameterElement parameter,
3910 IncDecOperator operator,
3911 A arg);
3912 3080
3913 /// Postfix expression with [operator] on a local [variable]. 3081 /// Postfix expression with [operator] on a local [variable].
3914 /// 3082 ///
3915 /// For instance: 3083 /// For instance:
3916 /// 3084 ///
3917 /// m() { 3085 /// m() {
3918 /// var variable; 3086 /// var variable;
3919 /// variable++; 3087 /// variable++;
3920 /// } 3088 /// }
3921 /// 3089 ///
3922 R visitLocalVariablePostfix( 3090 R visitLocalVariablePostfix(
3923 Send node, 3091 Send node, LocalVariableElement variable, IncDecOperator operator, A arg);
3924 LocalVariableElement variable,
3925 IncDecOperator operator,
3926 A arg);
3927 3092
3928 /// Postfix expression with [operator] on a final local [variable]. 3093 /// Postfix expression with [operator] on a final local [variable].
3929 /// 3094 ///
3930 /// For instance: 3095 /// For instance:
3931 /// 3096 ///
3932 /// m() { 3097 /// m() {
3933 /// final variable; 3098 /// final variable;
3934 /// variable++; 3099 /// variable++;
3935 /// } 3100 /// }
3936 /// 3101 ///
3937 R visitFinalLocalVariablePostfix( 3102 R visitFinalLocalVariablePostfix(
3938 Send node, 3103 Send node, LocalVariableElement variable, IncDecOperator operator, A arg);
3939 LocalVariableElement variable,
3940 IncDecOperator operator,
3941 A arg);
3942 3104
3943 /// Postfix expression with [operator] on a local [function]. 3105 /// Postfix expression with [operator] on a local [function].
3944 /// 3106 ///
3945 /// For instance: 3107 /// For instance:
3946 /// 3108 ///
3947 /// m() { 3109 /// m() {
3948 /// function() {} 3110 /// function() {}
3949 /// function++; 3111 /// function++;
3950 /// } 3112 /// }
3951 /// 3113 ///
3952 R visitLocalFunctionPostfix( 3114 R visitLocalFunctionPostfix(
3953 Send node, 3115 Send node, LocalFunctionElement function, IncDecOperator operator, A arg);
3954 LocalFunctionElement function,
3955 IncDecOperator operator,
3956 A arg);
3957
3958 3116
3959 /// Postfix expression with [operator] of the property on `this` whose getter 3117 /// Postfix expression with [operator] of the property on `this` whose getter
3960 /// and setter are defined by [getterSelector] and [setterSelector], 3118 /// and setter are defined by [getterSelector] and [setterSelector],
3961 /// respectively. 3119 /// respectively.
3962 /// 3120 ///
3963 /// For instance: 3121 /// For instance:
3964 /// 3122 ///
3965 /// class C { 3123 /// class C {
3966 /// m() => foo++; 3124 /// m() => foo++;
3967 /// } 3125 /// }
3968 /// 3126 ///
3969 /// or 3127 /// or
3970 /// 3128 ///
3971 /// class C { 3129 /// class C {
3972 /// m() => this.foo++; 3130 /// m() => this.foo++;
3973 /// } 3131 /// }
3974 /// 3132 ///
3975 R visitThisPropertyPostfix( 3133 R visitThisPropertyPostfix(
3976 Send node, 3134 Send node, Name name, IncDecOperator operator, A arg);
3977 Name name,
3978 IncDecOperator operator,
3979 A arg);
3980 3135
3981 /// Postfix expression with [operator] on a static [field]. 3136 /// Postfix expression with [operator] on a static [field].
3982 /// 3137 ///
3983 /// For instance: 3138 /// For instance:
3984 /// 3139 ///
3985 /// class C { 3140 /// class C {
3986 /// static var field; 3141 /// static var field;
3987 /// m() => field++; 3142 /// m() => field++;
3988 /// } 3143 /// }
3989 /// 3144 ///
3990 R visitStaticFieldPostfix( 3145 R visitStaticFieldPostfix(
3991 Send node, 3146 Send node, FieldElement field, IncDecOperator operator, A arg);
3992 FieldElement field,
3993 IncDecOperator operator,
3994 A arg);
3995 3147
3996 /// Postfix expression with [operator] on a final static [field]. 3148 /// Postfix expression with [operator] on a final static [field].
3997 /// 3149 ///
3998 /// For instance: 3150 /// For instance:
3999 /// 3151 ///
4000 /// class C { 3152 /// class C {
4001 /// static final field; 3153 /// static final field;
4002 /// m() => field++; 3154 /// m() => field++;
4003 /// } 3155 /// }
4004 /// 3156 ///
4005 R visitFinalStaticFieldPostfix( 3157 R visitFinalStaticFieldPostfix(
4006 Send node, 3158 Send node, FieldElement field, IncDecOperator operator, A arg);
4007 FieldElement field,
4008 IncDecOperator operator,
4009 A arg);
4010 3159
4011 /// Postfix expression with [operator] reading from a static [getter] and 3160 /// Postfix expression with [operator] reading from a static [getter] and
4012 /// writing to a static [setter]. 3161 /// writing to a static [setter].
4013 /// 3162 ///
4014 /// For instance: 3163 /// For instance:
4015 /// 3164 ///
4016 /// class C { 3165 /// class C {
4017 /// static get o => 0; 3166 /// static get o => 0;
4018 /// static set o(_) {} 3167 /// static set o(_) {}
4019 /// m() => o++; 3168 /// m() => o++;
4020 /// } 3169 /// }
4021 /// 3170 ///
4022 R visitStaticGetterSetterPostfix( 3171 R visitStaticGetterSetterPostfix(Send node, FunctionElement getter,
4023 Send node, 3172 FunctionElement setter, IncDecOperator operator, A arg);
4024 FunctionElement getter,
4025 FunctionElement setter,
4026 IncDecOperator operator,
4027 A arg);
4028
4029 3173
4030 /// Postfix expression with [operator] reading from a static [method], that 3174 /// Postfix expression with [operator] reading from a static [method], that
4031 /// is, closurizing [method], and writing to a static [setter]. 3175 /// is, closurizing [method], and writing to a static [setter].
4032 /// 3176 ///
4033 /// For instance: 3177 /// For instance:
4034 /// 3178 ///
4035 /// class C { 3179 /// class C {
4036 /// static o() {} 3180 /// static o() {}
4037 /// static set o(_) {} 3181 /// static set o(_) {}
4038 /// m() => o++; 3182 /// m() => o++;
4039 /// } 3183 /// }
4040 /// 3184 ///
4041 R visitStaticMethodSetterPostfix( 3185 R visitStaticMethodSetterPostfix(Send node, FunctionElement getter,
4042 Send node, 3186 FunctionElement setter, IncDecOperator operator, A arg);
4043 FunctionElement getter,
4044 FunctionElement setter,
4045 IncDecOperator operator,
4046 A arg);
4047 3187
4048 /// Postfix expression with [operator] on a top level [field]. 3188 /// Postfix expression with [operator] on a top level [field].
4049 /// 3189 ///
4050 /// For instance: 3190 /// For instance:
4051 /// 3191 ///
4052 /// var field; 3192 /// var field;
4053 /// m() => field++; 3193 /// m() => field++;
4054 /// 3194 ///
4055 R visitTopLevelFieldPostfix( 3195 R visitTopLevelFieldPostfix(
4056 Send node, 3196 Send node, FieldElement field, IncDecOperator operator, A arg);
4057 FieldElement field,
4058 IncDecOperator operator,
4059 A arg);
4060 3197
4061 /// Postfix expression with [operator] on a final top level [field]. 3198 /// Postfix expression with [operator] on a final top level [field].
4062 /// 3199 ///
4063 /// For instance: 3200 /// For instance:
4064 /// 3201 ///
4065 /// final field = 42; 3202 /// final field = 42;
4066 /// m() => field++; 3203 /// m() => field++;
4067 /// 3204 ///
4068 R visitFinalTopLevelFieldPostfix( 3205 R visitFinalTopLevelFieldPostfix(
4069 Send node, 3206 Send node, FieldElement field, IncDecOperator operator, A arg);
4070 FieldElement field,
4071 IncDecOperator operator,
4072 A arg);
4073 3207
4074 /// Postfix expression with [operator] reading from a top level [getter] and 3208 /// Postfix expression with [operator] reading from a top level [getter] and
4075 /// writing to a top level [setter]. 3209 /// writing to a top level [setter].
4076 /// 3210 ///
4077 /// For instance: 3211 /// For instance:
4078 /// 3212 ///
4079 /// get o => 0; 3213 /// get o => 0;
4080 /// set o(_) {} 3214 /// set o(_) {}
4081 /// m() => o++; 3215 /// m() => o++;
4082 /// 3216 ///
4083 R visitTopLevelGetterSetterPostfix( 3217 R visitTopLevelGetterSetterPostfix(Send node, FunctionElement getter,
4084 Send node, 3218 FunctionElement setter, IncDecOperator operator, A arg);
4085 FunctionElement getter,
4086 FunctionElement setter,
4087 IncDecOperator operator,
4088 A arg);
4089 3219
4090 /// Postfix expression with [operator] reading from a top level [method], that 3220 /// Postfix expression with [operator] reading from a top level [method], that
4091 /// is, closurizing [method], and writing to a top level [setter]. 3221 /// is, closurizing [method], and writing to a top level [setter].
4092 /// 3222 ///
4093 /// For instance: 3223 /// For instance:
4094 /// 3224 ///
4095 /// o() {} 3225 /// o() {}
4096 /// set o(_) {} 3226 /// set o(_) {}
4097 /// m() => o++; 3227 /// m() => o++;
4098 /// 3228 ///
4099 R visitTopLevelMethodSetterPostfix( 3229 R visitTopLevelMethodSetterPostfix(Send node, FunctionElement method,
4100 Send node, 3230 FunctionElement setter, IncDecOperator operator, A arg);
4101 FunctionElement method,
4102 FunctionElement setter,
4103 IncDecOperator operator,
4104 A arg);
4105 3231
4106 /// Postfix expression with [operator] on a super [field]. 3232 /// Postfix expression with [operator] on a super [field].
4107 /// 3233 ///
4108 /// For instance: 3234 /// For instance:
4109 /// 3235 ///
4110 /// class B { 3236 /// class B {
4111 /// var field; 3237 /// var field;
4112 /// } 3238 /// }
4113 /// class C extends B { 3239 /// class C extends B {
4114 /// m() => super.field++; 3240 /// m() => super.field++;
4115 /// } 3241 /// }
4116 /// 3242 ///
4117 R visitSuperFieldPostfix( 3243 R visitSuperFieldPostfix(
4118 Send node, 3244 Send node, FieldElement field, IncDecOperator operator, A arg);
4119 FieldElement field,
4120 IncDecOperator operator,
4121 A arg);
4122 3245
4123 /// Postfix expression with [operator] reading from the super field 3246 /// Postfix expression with [operator] reading from the super field
4124 /// [readField] and writing to the different super field [writtenField]. 3247 /// [readField] and writing to the different super field [writtenField].
4125 /// 3248 ///
4126 /// For instance: 3249 /// For instance:
4127 /// 3250 ///
4128 /// class A { 3251 /// class A {
4129 /// var field; 3252 /// var field;
4130 /// } 3253 /// }
4131 /// class B extends A { 3254 /// class B extends A {
4132 /// final field; 3255 /// final field;
4133 /// } 3256 /// }
4134 /// class C extends B { 3257 /// class C extends B {
4135 /// m() => super.field++; 3258 /// m() => super.field++;
4136 /// } 3259 /// }
4137 /// 3260 ///
4138 R visitSuperFieldFieldPostfix( 3261 R visitSuperFieldFieldPostfix(Send node, FieldElement readField,
4139 Send node, 3262 FieldElement writtenField, IncDecOperator operator, A arg);
4140 FieldElement readField,
4141 FieldElement writtenField,
4142 IncDecOperator operator,
4143 A arg);
4144 3263
4145 /// Postfix expression with [operator] reading from a super [field] and 3264 /// Postfix expression with [operator] reading from a super [field] and
4146 /// writing to a super [setter]. 3265 /// writing to a super [setter].
4147 /// 3266 ///
4148 /// For instance: 3267 /// For instance:
4149 /// 3268 ///
4150 /// class A { 3269 /// class A {
4151 /// var field; 3270 /// var field;
4152 /// } 3271 /// }
4153 /// class B extends A { 3272 /// class B extends A {
4154 /// set field(_) {} 3273 /// set field(_) {}
4155 /// } 3274 /// }
4156 /// class C extends B { 3275 /// class C extends B {
4157 /// m() => super.field++; 3276 /// m() => super.field++;
4158 /// } 3277 /// }
4159 /// 3278 ///
4160 R visitSuperFieldSetterPostfix( 3279 R visitSuperFieldSetterPostfix(Send node, FieldElement field,
4161 Send node, 3280 FunctionElement setter, IncDecOperator operator, A arg);
4162 FieldElement field,
4163 FunctionElement setter,
4164 IncDecOperator operator,
4165 A arg);
4166
4167 3281
4168 /// Postfix expression with [operator] reading from a super [getter] and 3282 /// Postfix expression with [operator] reading from a super [getter] and
4169 /// writing to a super [setter]. 3283 /// writing to a super [setter].
4170 /// 3284 ///
4171 /// For instance: 3285 /// For instance:
4172 /// 3286 ///
4173 /// class B { 3287 /// class B {
4174 /// get field => 0; 3288 /// get field => 0;
4175 /// set field(_) {} 3289 /// set field(_) {}
4176 /// } 3290 /// }
4177 /// class C extends B { 3291 /// class C extends B {
4178 /// m() => super.field++; 3292 /// m() => super.field++;
4179 /// } 3293 /// }
4180 /// 3294 ///
4181 R visitSuperGetterSetterPostfix( 3295 R visitSuperGetterSetterPostfix(Send node, FunctionElement getter,
4182 Send node, 3296 FunctionElement setter, IncDecOperator operator, A arg);
4183 FunctionElement getter,
4184 FunctionElement setter,
4185 IncDecOperator operator,
4186 A arg);
4187 3297
4188 /// Postfix expression with [operator] reading from a super [getter] and 3298 /// Postfix expression with [operator] reading from a super [getter] and
4189 /// writing to a super [field]. 3299 /// writing to a super [field].
4190 /// 3300 ///
4191 /// For instance: 3301 /// For instance:
4192 /// 3302 ///
4193 /// class A { 3303 /// class A {
4194 /// var field; 3304 /// var field;
4195 /// } 3305 /// }
4196 /// class B extends A { 3306 /// class B extends A {
4197 /// get field => 0; 3307 /// get field => 0;
4198 /// } 3308 /// }
4199 /// class C extends B { 3309 /// class C extends B {
4200 /// m() => super.field++; 3310 /// m() => super.field++;
4201 /// } 3311 /// }
4202 /// 3312 ///
4203 R visitSuperGetterFieldPostfix( 3313 R visitSuperGetterFieldPostfix(Send node, FunctionElement getter,
4204 Send node, 3314 FieldElement field, IncDecOperator operator, A arg);
4205 FunctionElement getter,
4206 FieldElement field,
4207 IncDecOperator operator,
4208 A arg);
4209 3315
4210 /// Postfix expression with [operator] reading from a super [method], that is, 3316 /// Postfix expression with [operator] reading from a super [method], that is,
4211 /// closurizing [method], and writing to a super [setter]. 3317 /// closurizing [method], and writing to a super [setter].
4212 /// 3318 ///
4213 /// For instance: 3319 /// For instance:
4214 /// 3320 ///
4215 /// class B { 3321 /// class B {
4216 /// o() {} 3322 /// o() {}
4217 /// set o(_) {} 3323 /// set o(_) {}
4218 /// } 3324 /// }
4219 /// class C extends B { 3325 /// class C extends B {
4220 /// m() => super.o++; 3326 /// m() => super.o++;
4221 /// } 3327 /// }
4222 /// 3328 ///
4223 R visitSuperMethodSetterPostfix( 3329 R visitSuperMethodSetterPostfix(Send node, FunctionElement method,
4224 Send node, 3330 FunctionElement setter, IncDecOperator operator, A arg);
4225 FunctionElement method,
4226 FunctionElement setter,
4227 IncDecOperator operator,
4228 A arg);
4229 3331
4230 /// Postfix expression with [operator] reading from a super [method], that is, 3332 /// Postfix expression with [operator] reading from a super [method], that is,
4231 /// closurizing [method], and writing to an unresolved super. 3333 /// closurizing [method], and writing to an unresolved super.
4232 /// 3334 ///
4233 /// For instance: 3335 /// For instance:
4234 /// 3336 ///
4235 /// class B { 3337 /// class B {
4236 /// o() {} 3338 /// o() {}
4237 /// set o(_) {} 3339 /// set o(_) {}
4238 /// } 3340 /// }
4239 /// class C extends B { 3341 /// class C extends B {
4240 /// m() => super.o++; 3342 /// m() => super.o++;
4241 /// } 3343 /// }
4242 /// 3344 ///
4243 R visitSuperMethodPostfix( 3345 R visitSuperMethodPostfix(
4244 Send node, 3346 Send node, FunctionElement method, IncDecOperator operator, A arg);
4245 FunctionElement method,
4246 IncDecOperator operator,
4247 A arg);
4248 3347
4249 /// Prefix expression with [operator] reading from an unresolved super getter 3348 /// Prefix expression with [operator] reading from an unresolved super getter
4250 /// and writing to a super [setter]. 3349 /// and writing to a super [setter].
4251 /// 3350 ///
4252 /// For instance: 3351 /// For instance:
4253 /// 3352 ///
4254 /// class B { 3353 /// class B {
4255 /// set o(_) {} 3354 /// set o(_) {}
4256 /// } 3355 /// }
4257 /// class C extends B { 3356 /// class C extends B {
4258 /// m() => super.o++; 3357 /// m() => super.o++;
4259 /// } 3358 /// }
4260 /// 3359 ///
4261 /// 3360 ///
4262 R visitUnresolvedSuperGetterPostfix( 3361 R visitUnresolvedSuperGetterPostfix(Send node, Element element,
4263 Send node, 3362 MethodElement setter, IncDecOperator operator, A arg);
4264 Element element,
4265 MethodElement setter,
4266 IncDecOperator operator,
4267 A arg);
4268 3363
4269 /// Prefix expression with [operator] reading from a super [getter] and 3364 /// Prefix expression with [operator] reading from a super [getter] and
4270 /// writing to an unresolved super setter. 3365 /// writing to an unresolved super setter.
4271 /// 3366 ///
4272 /// For instance: 3367 /// For instance:
4273 /// 3368 ///
4274 /// class B { 3369 /// class B {
4275 /// get o => 42 3370 /// get o => 42
4276 /// } 3371 /// }
4277 /// class C extends B { 3372 /// class C extends B {
4278 /// m() => super.o++; 3373 /// m() => super.o++;
4279 /// } 3374 /// }
4280 /// 3375 ///
4281 /// 3376 ///
4282 R visitUnresolvedSuperSetterPostfix( 3377 R visitUnresolvedSuperSetterPostfix(Send node, MethodElement getter,
4283 Send node, 3378 Element element, IncDecOperator operator, A arg);
4284 MethodElement getter,
4285 Element element,
4286 IncDecOperator operator,
4287 A arg);
4288 3379
4289 /// Postfix expression with [operator] on a type literal for a class 3380 /// Postfix expression with [operator] on a type literal for a class
4290 /// [element]. 3381 /// [element].
4291 /// 3382 ///
4292 /// For instance: 3383 /// For instance:
4293 /// 3384 ///
4294 /// class C {} 3385 /// class C {}
4295 /// m() => C++; 3386 /// m() => C++;
4296 /// 3387 ///
4297 R visitClassTypeLiteralPostfix( 3388 R visitClassTypeLiteralPostfix(
4298 Send node, 3389 Send node, ConstantExpression constant, IncDecOperator operator, A arg);
4299 ConstantExpression constant,
4300 IncDecOperator operator,
4301 A arg);
4302 3390
4303 /// Postfix expression with [operator] on a type literal for a typedef 3391 /// Postfix expression with [operator] on a type literal for a typedef
4304 /// [element]. 3392 /// [element].
4305 /// 3393 ///
4306 /// For instance: 3394 /// For instance:
4307 /// 3395 ///
4308 /// typedef F(); 3396 /// typedef F();
4309 /// m() => F++; 3397 /// m() => F++;
4310 /// 3398 ///
4311 R visitTypedefTypeLiteralPostfix( 3399 R visitTypedefTypeLiteralPostfix(
4312 Send node, 3400 Send node, ConstantExpression constant, IncDecOperator operator, A arg);
4313 ConstantExpression constant,
4314 IncDecOperator operator,
4315 A arg);
4316 3401
4317 /// Postfix expression with [operator] on a type literal for a type variable 3402 /// Postfix expression with [operator] on a type literal for a type variable
4318 /// [element]. 3403 /// [element].
4319 /// 3404 ///
4320 /// For instance: 3405 /// For instance:
4321 /// 3406 ///
4322 /// class C<T> { 3407 /// class C<T> {
4323 /// m() => T++; 3408 /// m() => T++;
4324 /// } 3409 /// }
4325 /// 3410 ///
4326 R visitTypeVariableTypeLiteralPostfix( 3411 R visitTypeVariableTypeLiteralPostfix(
4327 Send node, 3412 Send node, TypeVariableElement element, IncDecOperator operator, A arg);
4328 TypeVariableElement element,
4329 IncDecOperator operator,
4330 A arg);
4331 3413
4332 /// Postfix expression with [operator] on the type literal for `dynamic`. 3414 /// Postfix expression with [operator] on the type literal for `dynamic`.
4333 /// 3415 ///
4334 /// For instance: 3416 /// For instance:
4335 /// 3417 ///
4336 /// m() => dynamic++; 3418 /// m() => dynamic++;
4337 /// 3419 ///
4338 R visitDynamicTypeLiteralPostfix( 3420 R visitDynamicTypeLiteralPostfix(
4339 Send node, 3421 Send node, ConstantExpression constant, IncDecOperator operator, A arg);
4340 ConstantExpression constant,
4341 IncDecOperator operator,
4342 A arg);
4343 3422
4344 /// Read of the [constant]. 3423 /// Read of the [constant].
4345 /// 3424 ///
4346 /// For instance: 3425 /// For instance:
4347 /// 3426 ///
4348 /// const c = c; 3427 /// const c = c;
4349 /// m() => c; 3428 /// m() => c;
4350 /// 3429 ///
4351 R visitConstantGet( 3430 R visitConstantGet(Send node, ConstantExpression constant, A arg);
4352 Send node,
4353 ConstantExpression constant,
4354 A arg);
4355 3431
4356 /// Invocation of the [constant] with [arguments]. 3432 /// Invocation of the [constant] with [arguments].
4357 /// 3433 ///
4358 /// For instance: 3434 /// For instance:
4359 /// 3435 ///
4360 /// const c = null; 3436 /// const c = null;
4361 /// m() => c(null, 42); 3437 /// m() => c(null, 42);
4362 /// 3438 ///
4363 R visitConstantInvoke( 3439 R visitConstantInvoke(Send node, ConstantExpression constant,
4364 Send node, 3440 NodeList arguments, CallStructure callStructure, A arg);
4365 ConstantExpression constant,
4366 NodeList arguments,
4367 CallStructure callStructure,
4368 A arg);
4369 3441
4370 /// Read of the unresolved [element]. 3442 /// Read of the unresolved [element].
4371 /// 3443 ///
4372 /// For instance: 3444 /// For instance:
4373 /// 3445 ///
4374 /// class C {} 3446 /// class C {}
4375 /// m1() => unresolved; 3447 /// m1() => unresolved;
4376 /// m2() => prefix.unresolved; 3448 /// m2() => prefix.unresolved;
4377 /// m3() => Unresolved.foo; 3449 /// m3() => Unresolved.foo;
4378 /// m4() => unresolved.foo; 3450 /// m4() => unresolved.foo;
4379 /// m5() => unresolved.Foo.bar; 3451 /// m5() => unresolved.Foo.bar;
4380 /// m6() => C.unresolved; 3452 /// m6() => C.unresolved;
4381 /// m7() => prefix.C.unresolved; 3453 /// m7() => prefix.C.unresolved;
4382 /// m8() => prefix?.unresolved; 3454 /// m8() => prefix?.unresolved;
4383 /// m9() => Unresolved?.foo; 3455 /// m9() => Unresolved?.foo;
4384 /// m10() => unresolved?.foo; 3456 /// m10() => unresolved?.foo;
4385 /// m11() => unresolved?.Foo?.bar; 3457 /// m11() => unresolved?.Foo?.bar;
4386 /// 3458 ///
4387 // TODO(johnniwinther): Split the cases in which a prefix is resolved. 3459 // TODO(johnniwinther): Split the cases in which a prefix is resolved.
4388 R visitUnresolvedGet( 3460 R visitUnresolvedGet(Send node, Element element, A arg);
4389 Send node,
4390 Element element,
4391 A arg);
4392 3461
4393 /// Read of the unresolved super [element]. 3462 /// Read of the unresolved super [element].
4394 /// 3463 ///
4395 /// For instance: 3464 /// For instance:
4396 /// 3465 ///
4397 /// class B {} 3466 /// class B {}
4398 /// class C { 3467 /// class C {
4399 /// m() => super.foo; 3468 /// m() => super.foo;
4400 /// } 3469 /// }
4401 /// 3470 ///
4402 R visitUnresolvedSuperGet( 3471 R visitUnresolvedSuperGet(Send node, Element element, A arg);
4403 Send node,
4404 Element element,
4405 A arg);
4406 3472
4407 /// Assignment of [rhs] to the unresolved [element]. 3473 /// Assignment of [rhs] to the unresolved [element].
4408 /// 3474 ///
4409 /// For instance: 3475 /// For instance:
4410 /// 3476 ///
4411 /// class C {} 3477 /// class C {}
4412 /// m1() => unresolved = 42; 3478 /// m1() => unresolved = 42;
4413 /// m2() => prefix.unresolved = 42; 3479 /// m2() => prefix.unresolved = 42;
4414 /// m3() => Unresolved.foo = 42; 3480 /// m3() => Unresolved.foo = 42;
4415 /// m4() => unresolved.foo = 42; 3481 /// m4() => unresolved.foo = 42;
4416 /// m5() => unresolved.Foo.bar = 42; 3482 /// m5() => unresolved.Foo.bar = 42;
4417 /// m6() => C.unresolved = 42; 3483 /// m6() => C.unresolved = 42;
4418 /// m7() => prefix.C.unresolved = 42; 3484 /// m7() => prefix.C.unresolved = 42;
4419 /// m8() => prefix?.unresolved = 42; 3485 /// m8() => prefix?.unresolved = 42;
4420 /// m9() => Unresolved?.foo = 42; 3486 /// m9() => Unresolved?.foo = 42;
4421 /// m10() => unresolved?.foo = 42; 3487 /// m10() => unresolved?.foo = 42;
4422 /// m11() => unresolved?.Foo?.bar = 42; 3488 /// m11() => unresolved?.Foo?.bar = 42;
4423 /// 3489 ///
4424 // TODO(johnniwinther): Split the cases in which a prefix is resolved. 3490 // TODO(johnniwinther): Split the cases in which a prefix is resolved.
4425 R visitUnresolvedSet( 3491 R visitUnresolvedSet(Send node, Element element, Node rhs, A arg);
4426 Send node,
4427 Element element,
4428 Node rhs,
4429 A arg);
4430 3492
4431 /// Assignment of [rhs] to the unresolved super [element]. 3493 /// Assignment of [rhs] to the unresolved super [element].
4432 /// 3494 ///
4433 /// For instance: 3495 /// For instance:
4434 /// 3496 ///
4435 /// class B {} 3497 /// class B {}
4436 /// class C { 3498 /// class C {
4437 /// m() => super.foo = 42; 3499 /// m() => super.foo = 42;
4438 /// } 3500 /// }
4439 /// 3501 ///
4440 R visitUnresolvedSuperSet( 3502 R visitUnresolvedSuperSet(Send node, Element element, Node rhs, A arg);
4441 Send node,
4442 Element element,
4443 Node rhs,
4444 A arg);
4445 3503
4446 /// Invocation of the unresolved [element] with [arguments]. 3504 /// Invocation of the unresolved [element] with [arguments].
4447 /// 3505 ///
4448 /// For instance: 3506 /// For instance:
4449 /// 3507 ///
4450 /// class C {} 3508 /// class C {}
4451 /// m1() => unresolved(null, 42); 3509 /// m1() => unresolved(null, 42);
4452 /// m2() => prefix.unresolved(null, 42); 3510 /// m2() => prefix.unresolved(null, 42);
4453 /// m3() => Unresolved.foo(null, 42); 3511 /// m3() => Unresolved.foo(null, 42);
4454 /// m4() => unresolved.foo(null, 42); 3512 /// m4() => unresolved.foo(null, 42);
4455 /// m5() => unresolved.Foo.bar(null, 42); 3513 /// m5() => unresolved.Foo.bar(null, 42);
4456 /// m6() => C.unresolved(null, 42); 3514 /// m6() => C.unresolved(null, 42);
4457 /// m7() => prefix.C.unresolved(null, 42); 3515 /// m7() => prefix.C.unresolved(null, 42);
4458 /// m8() => prefix?.unresolved(null, 42); 3516 /// m8() => prefix?.unresolved(null, 42);
4459 /// m9() => Unresolved?.foo(null, 42); 3517 /// m9() => Unresolved?.foo(null, 42);
4460 /// m10() => unresolved?.foo(null, 42); 3518 /// m10() => unresolved?.foo(null, 42);
4461 /// m11() => unresolved?.Foo?.bar(null, 42); 3519 /// m11() => unresolved?.Foo?.bar(null, 42);
4462 /// 3520 ///
4463 // TODO(johnniwinther): Split the cases in which a prefix is resolved. 3521 // TODO(johnniwinther): Split the cases in which a prefix is resolved.
4464 R visitUnresolvedInvoke( 3522 R visitUnresolvedInvoke(
4465 Send node, 3523 Send node, Element element, NodeList arguments, Selector selector, A arg);
4466 Element element,
4467 NodeList arguments,
4468 Selector selector,
4469 A arg);
4470 3524
4471 /// Invocation of the unresolved super [element] with [arguments]. 3525 /// Invocation of the unresolved super [element] with [arguments].
4472 /// 3526 ///
4473 /// For instance: 3527 /// For instance:
4474 /// 3528 ///
4475 /// class B {} 3529 /// class B {}
4476 /// class C extends B { 3530 /// class C extends B {
4477 /// m() => super.foo(); 3531 /// m() => super.foo();
4478 /// } 3532 /// }
4479 /// 3533 ///
4480 R visitUnresolvedSuperInvoke( 3534 R visitUnresolvedSuperInvoke(
4481 Send node, 3535 Send node, Element element, NodeList arguments, Selector selector, A arg);
4482 Element element,
4483 NodeList arguments,
4484 Selector selector,
4485 A arg);
4486 3536
4487 /// Compound assignment of [rhs] with [operator] reading from the 3537 /// Compound assignment of [rhs] with [operator] reading from the
4488 /// non-existing static getter and writing to the static [setter]. 3538 /// non-existing static getter and writing to the static [setter].
4489 /// 3539 ///
4490 /// For instance: 3540 /// For instance:
4491 /// 3541 ///
4492 /// class C { 3542 /// class C {
4493 /// set foo(_) {} 3543 /// set foo(_) {}
4494 /// } 3544 /// }
4495 /// m1() => C.foo += 42; 3545 /// m1() => C.foo += 42;
4496 /// 3546 ///
4497 R visitUnresolvedStaticGetterCompound( 3547 R visitUnresolvedStaticGetterCompound(Send node, Element element,
4498 Send node, 3548 MethodElement setter, AssignmentOperator operator, Node rhs, A arg);
4499 Element element,
4500 MethodElement setter,
4501 AssignmentOperator operator,
4502 Node rhs,
4503 A arg);
4504 3549
4505 /// Compound assignment of [rhs] with [operator] reading from the 3550 /// Compound assignment of [rhs] with [operator] reading from the
4506 /// non-existing top level getter and writing to the top level [setter]. 3551 /// non-existing top level getter and writing to the top level [setter].
4507 /// 3552 ///
4508 /// For instance: 3553 /// For instance:
4509 /// 3554 ///
4510 /// set foo(_) {} 3555 /// set foo(_) {}
4511 /// m1() => foo += 42; 3556 /// m1() => foo += 42;
4512 /// 3557 ///
4513 R visitUnresolvedTopLevelGetterCompound( 3558 R visitUnresolvedTopLevelGetterCompound(Send node, Element element,
4514 Send node, 3559 MethodElement setter, AssignmentOperator operator, Node rhs, A arg);
4515 Element element,
4516 MethodElement setter,
4517 AssignmentOperator operator,
4518 Node rhs,
4519 A arg);
4520 3560
4521 /// Compound assignment of [rhs] with [operator] reading from the static 3561 /// Compound assignment of [rhs] with [operator] reading from the static
4522 /// [getter] and writing to the non-existing static setter. 3562 /// [getter] and writing to the non-existing static setter.
4523 /// 3563 ///
4524 /// For instance: 3564 /// For instance:
4525 /// 3565 ///
4526 /// class C { 3566 /// class C {
4527 /// get foo => 42; 3567 /// get foo => 42;
4528 /// } 3568 /// }
4529 /// m1() => C.foo += 42; 3569 /// m1() => C.foo += 42;
4530 /// 3570 ///
4531 R visitUnresolvedStaticSetterCompound( 3571 R visitUnresolvedStaticSetterCompound(Send node, MethodElement getter,
4532 Send node, 3572 Element element, AssignmentOperator operator, Node rhs, A arg);
4533 MethodElement getter,
4534 Element element,
4535 AssignmentOperator operator,
4536 Node rhs,
4537 A arg);
4538 3573
4539 /// Compound assignment of [rhs] with [operator] reading from the top level 3574 /// Compound assignment of [rhs] with [operator] reading from the top level
4540 /// [getter] and writing to the non-existing top level setter. 3575 /// [getter] and writing to the non-existing top level setter.
4541 /// 3576 ///
4542 /// For instance: 3577 /// For instance:
4543 /// 3578 ///
4544 /// get foo => 42; 3579 /// get foo => 42;
4545 /// m1() => foo += 42; 3580 /// m1() => foo += 42;
4546 /// 3581 ///
4547 R visitUnresolvedTopLevelSetterCompound( 3582 R visitUnresolvedTopLevelSetterCompound(Send node, MethodElement getter,
4548 Send node, 3583 Element element, AssignmentOperator operator, Node rhs, A arg);
4549 MethodElement getter,
4550 Element element,
4551 AssignmentOperator operator,
4552 Node rhs,
4553 A arg);
4554 3584
4555 /// Compound assignment of [rhs] with [operator] reading the closurized static 3585 /// Compound assignment of [rhs] with [operator] reading the closurized static
4556 /// [method] and trying to invoke the non-existing setter. 3586 /// [method] and trying to invoke the non-existing setter.
4557 /// 3587 ///
4558 /// For instance: 3588 /// For instance:
4559 /// 3589 ///
4560 /// class C { 3590 /// class C {
4561 /// foo() {} 3591 /// foo() {}
4562 /// } 3592 /// }
4563 /// m1() => C.foo += 42; 3593 /// m1() => C.foo += 42;
4564 /// 3594 ///
4565 R visitStaticMethodCompound( 3595 R visitStaticMethodCompound(Send node, MethodElement method,
4566 Send node, 3596 AssignmentOperator operator, Node rhs, A arg);
4567 MethodElement method,
4568 AssignmentOperator operator,
4569 Node rhs,
4570 A arg);
4571 3597
4572 /// Compound assignment of [rhs] where both getter and setter are unresolved. 3598 /// Compound assignment of [rhs] where both getter and setter are unresolved.
4573 /// 3599 ///
4574 /// For instance: 3600 /// For instance:
4575 /// 3601 ///
4576 /// class C {} 3602 /// class C {}
4577 /// m1() => unresolved += 42; 3603 /// m1() => unresolved += 42;
4578 /// m2() => prefix.unresolved += 42; 3604 /// m2() => prefix.unresolved += 42;
4579 /// m3() => Unresolved.foo += 42; 3605 /// m3() => Unresolved.foo += 42;
4580 /// m4() => unresolved.foo += 42; 3606 /// m4() => unresolved.foo += 42;
4581 /// m5() => unresolved.Foo.bar += 42; 3607 /// m5() => unresolved.Foo.bar += 42;
4582 /// m6() => C.unresolved += 42; 3608 /// m6() => C.unresolved += 42;
4583 /// m7() => prefix.C.unresolved += 42; 3609 /// m7() => prefix.C.unresolved += 42;
4584 /// m8() => prefix?.unresolved += 42; 3610 /// m8() => prefix?.unresolved += 42;
4585 /// m9() => Unresolved?.foo += 42; 3611 /// m9() => Unresolved?.foo += 42;
4586 /// m10() => unresolved?.foo += 42; 3612 /// m10() => unresolved?.foo += 42;
4587 /// m11() => unresolved?.Foo?.bar += 42; 3613 /// m11() => unresolved?.Foo?.bar += 42;
4588 /// 3614 ///
4589 // TODO(johnniwinther): Split the cases in which a prefix is resolved. 3615 // TODO(johnniwinther): Split the cases in which a prefix is resolved.
4590 R visitUnresolvedCompound( 3616 R visitUnresolvedCompound(
4591 Send node, 3617 Send node, Element element, AssignmentOperator operator, Node rhs, A arg);
4592 Element element,
4593 AssignmentOperator operator,
4594 Node rhs,
4595 A arg);
4596 3618
4597 /// Prefix operation of [operator] reading from the non-existing static getter 3619 /// Prefix operation of [operator] reading from the non-existing static getter
4598 /// and writing to the static [setter]. 3620 /// and writing to the static [setter].
4599 /// 3621 ///
4600 /// For instance: 3622 /// For instance:
4601 /// 3623 ///
4602 /// class C { 3624 /// class C {
4603 /// set foo(_) {} 3625 /// set foo(_) {}
4604 /// } 3626 /// }
4605 /// m1() => ++C.foo; 3627 /// m1() => ++C.foo;
4606 /// 3628 ///
4607 R visitUnresolvedStaticGetterPrefix( 3629 R visitUnresolvedStaticGetterPrefix(Send node, Element element,
4608 Send node, 3630 MethodElement setter, IncDecOperator operator, A arg);
4609 Element element,
4610 MethodElement setter,
4611 IncDecOperator operator,
4612 A arg);
4613 3631
4614 /// Prefix operation of [operator] reading from the non-existing top level 3632 /// Prefix operation of [operator] reading from the non-existing top level
4615 /// getter and writing to the top level [setter]. 3633 /// getter and writing to the top level [setter].
4616 /// 3634 ///
4617 /// For instance: 3635 /// For instance:
4618 /// 3636 ///
4619 /// set foo(_) {} 3637 /// set foo(_) {}
4620 /// m1() => ++foo; 3638 /// m1() => ++foo;
4621 /// 3639 ///
4622 R visitUnresolvedTopLevelGetterPrefix( 3640 R visitUnresolvedTopLevelGetterPrefix(Send node, Element element,
4623 Send node, 3641 MethodElement setter, IncDecOperator operator, A arg);
4624 Element element,
4625 MethodElement setter,
4626 IncDecOperator operator,
4627 A arg);
4628 3642
4629 /// Prefix operation of [operator] reading from the static [getter] and 3643 /// Prefix operation of [operator] reading from the static [getter] and
4630 /// writing to the non-existing static setter. 3644 /// writing to the non-existing static setter.
4631 /// 3645 ///
4632 /// For instance: 3646 /// For instance:
4633 /// 3647 ///
4634 /// class C { 3648 /// class C {
4635 /// get foo => 42; 3649 /// get foo => 42;
4636 /// } 3650 /// }
4637 /// m1() => ++C.foo; 3651 /// m1() => ++C.foo;
4638 /// 3652 ///
4639 R visitUnresolvedStaticSetterPrefix( 3653 R visitUnresolvedStaticSetterPrefix(Send node, MethodElement getter,
4640 Send node, 3654 Element element, IncDecOperator operator, A arg);
4641 MethodElement getter,
4642 Element element,
4643 IncDecOperator operator,
4644 A arg);
4645 3655
4646 /// Postfix operation of [operator] reading from the top level [getter] and 3656 /// Postfix operation of [operator] reading from the top level [getter] and
4647 /// writing to the non-existing top level setter. 3657 /// writing to the non-existing top level setter.
4648 /// 3658 ///
4649 /// For instance: 3659 /// For instance:
4650 /// 3660 ///
4651 /// get foo => 42; 3661 /// get foo => 42;
4652 /// m1() => ++foo; 3662 /// m1() => ++foo;
4653 /// 3663 ///
4654 R visitUnresolvedTopLevelSetterPrefix( 3664 R visitUnresolvedTopLevelSetterPrefix(Send node, MethodElement getter,
4655 Send node, 3665 Element element, IncDecOperator operator, A arg);
4656 MethodElement getter,
4657 Element element,
4658 IncDecOperator operator,
4659 A arg);
4660 3666
4661 /// Prefix operation of [operator] reading the closurized static [method] and 3667 /// Prefix operation of [operator] reading the closurized static [method] and
4662 /// trying to invoke the non-existing setter. 3668 /// trying to invoke the non-existing setter.
4663 /// 3669 ///
4664 /// For instance: 3670 /// For instance:
4665 /// 3671 ///
4666 /// class C { 3672 /// class C {
4667 /// foo() {} 3673 /// foo() {}
4668 /// } 3674 /// }
4669 /// m1() => ++C.foo; 3675 /// m1() => ++C.foo;
4670 /// 3676 ///
4671 R visitStaticMethodPrefix( 3677 R visitStaticMethodPrefix(
4672 Send node, 3678 Send node, MethodElement method, IncDecOperator operator, A arg);
4673 MethodElement method,
4674 IncDecOperator operator,
4675 A arg);
4676 3679
4677 /// Prefix operation of [operator] reading the closurized top level [method] 3680 /// Prefix operation of [operator] reading the closurized top level [method]
4678 /// and trying to invoke the non-existing setter. 3681 /// and trying to invoke the non-existing setter.
4679 /// 3682 ///
4680 /// For instance: 3683 /// For instance:
4681 /// 3684 ///
4682 /// class C { 3685 /// class C {
4683 /// foo() {} 3686 /// foo() {}
4684 /// } 3687 /// }
4685 /// m1() => ++C.foo; 3688 /// m1() => ++C.foo;
4686 /// 3689 ///
4687 R visitTopLevelMethodPrefix( 3690 R visitTopLevelMethodPrefix(
4688 Send node, 3691 Send node, MethodElement method, IncDecOperator operator, A arg);
4689 MethodElement method,
4690 IncDecOperator operator,
4691 A arg);
4692 3692
4693 /// Prefix operation where both getter and setter are unresolved. 3693 /// Prefix operation where both getter and setter are unresolved.
4694 /// 3694 ///
4695 /// For instance: 3695 /// For instance:
4696 /// 3696 ///
4697 /// class C {} 3697 /// class C {}
4698 /// m1() => ++unresolved; 3698 /// m1() => ++unresolved;
4699 /// m2() => ++prefix.unresolved; 3699 /// m2() => ++prefix.unresolved;
4700 /// m3() => ++Unresolved.foo; 3700 /// m3() => ++Unresolved.foo;
4701 /// m4() => ++unresolved.foo; 3701 /// m4() => ++unresolved.foo;
4702 /// m5() => ++unresolved.Foo.bar; 3702 /// m5() => ++unresolved.Foo.bar;
4703 /// m6() => ++C.unresolved; 3703 /// m6() => ++C.unresolved;
4704 /// m7() => ++prefix.C.unresolved; 3704 /// m7() => ++prefix.C.unresolved;
4705 /// m8() => ++prefix?.unresolved; 3705 /// m8() => ++prefix?.unresolved;
4706 /// m9() => ++Unresolved?.foo; 3706 /// m9() => ++Unresolved?.foo;
4707 /// m10() => ++unresolved?.foo; 3707 /// m10() => ++unresolved?.foo;
4708 /// m11() => ++unresolved?.Foo?.bar; 3708 /// m11() => ++unresolved?.Foo?.bar;
4709 /// 3709 ///
4710 // TODO(johnniwinther): Split the cases in which a prefix is resolved. 3710 // TODO(johnniwinther): Split the cases in which a prefix is resolved.
4711 R visitUnresolvedPrefix( 3711 R visitUnresolvedPrefix(
4712 Send node, 3712 Send node, Element element, IncDecOperator operator, A arg);
4713 Element element,
4714 IncDecOperator operator,
4715 A arg);
4716 3713
4717 /// Postfix operation of [operator] reading from the non-existing static 3714 /// Postfix operation of [operator] reading from the non-existing static
4718 /// getter and writing to the static [setter]. 3715 /// getter and writing to the static [setter].
4719 /// 3716 ///
4720 /// For instance: 3717 /// For instance:
4721 /// 3718 ///
4722 /// class C { 3719 /// class C {
4723 /// set foo(_) {} 3720 /// set foo(_) {}
4724 /// } 3721 /// }
4725 /// m1() => C.foo++; 3722 /// m1() => C.foo++;
4726 /// 3723 ///
4727 R visitUnresolvedStaticGetterPostfix( 3724 R visitUnresolvedStaticGetterPostfix(Send node, Element element,
4728 Send node, 3725 MethodElement setter, IncDecOperator operator, A arg);
4729 Element element,
4730 MethodElement setter,
4731 IncDecOperator operator,
4732 A arg);
4733 3726
4734 /// Postfix operation of [operator] reading from the non-existing top level 3727 /// Postfix operation of [operator] reading from the non-existing top level
4735 /// getter and writing to the top level [setter]. 3728 /// getter and writing to the top level [setter].
4736 /// 3729 ///
4737 /// For instance: 3730 /// For instance:
4738 /// 3731 ///
4739 /// set foo(_) {} 3732 /// set foo(_) {}
4740 /// m1() => foo++; 3733 /// m1() => foo++;
4741 /// 3734 ///
4742 R visitUnresolvedTopLevelGetterPostfix( 3735 R visitUnresolvedTopLevelGetterPostfix(Send node, Element element,
4743 Send node, 3736 MethodElement setter, IncDecOperator operator, A arg);
4744 Element element,
4745 MethodElement setter,
4746 IncDecOperator operator,
4747 A arg);
4748 3737
4749 /// Postfix operation of [operator] reading from the static [getter] and 3738 /// Postfix operation of [operator] reading from the static [getter] and
4750 /// writing to the non-existing static setter. 3739 /// writing to the non-existing static setter.
4751 /// 3740 ///
4752 /// For instance: 3741 /// For instance:
4753 /// 3742 ///
4754 /// class C { 3743 /// class C {
4755 /// get foo => 42; 3744 /// get foo => 42;
4756 /// } 3745 /// }
4757 /// m1() => C.foo++; 3746 /// m1() => C.foo++;
4758 /// 3747 ///
4759 R visitUnresolvedStaticSetterPostfix( 3748 R visitUnresolvedStaticSetterPostfix(Send node, MethodElement getter,
4760 Send node, 3749 Element element, IncDecOperator operator, A arg);
4761 MethodElement getter,
4762 Element element,
4763 IncDecOperator operator,
4764 A arg);
4765 3750
4766 /// Postfix operation of [operator] reading from the top level [getter] and 3751 /// Postfix operation of [operator] reading from the top level [getter] and
4767 /// writing to the non-existing top level setter. 3752 /// writing to the non-existing top level setter.
4768 /// 3753 ///
4769 /// For instance: 3754 /// For instance:
4770 /// 3755 ///
4771 /// get foo => 42; 3756 /// get foo => 42;
4772 /// m1() => foo++; 3757 /// m1() => foo++;
4773 /// 3758 ///
4774 R visitUnresolvedTopLevelSetterPostfix( 3759 R visitUnresolvedTopLevelSetterPostfix(Send node, MethodElement getter,
4775 Send node, 3760 Element element, IncDecOperator operator, A arg);
4776 MethodElement getter,
4777 Element element,
4778 IncDecOperator operator,
4779 A arg);
4780 3761
4781 /// Postfix operation of [operator] reading the closurized static [method] and 3762 /// Postfix operation of [operator] reading the closurized static [method] and
4782 /// trying to invoke the non-existing setter. 3763 /// trying to invoke the non-existing setter.
4783 /// 3764 ///
4784 /// For instance: 3765 /// For instance:
4785 /// 3766 ///
4786 /// class C { 3767 /// class C {
4787 /// foo() {} 3768 /// foo() {}
4788 /// } 3769 /// }
4789 /// m1() => C.foo++; 3770 /// m1() => C.foo++;
4790 /// 3771 ///
4791 R visitStaticMethodPostfix( 3772 R visitStaticMethodPostfix(
4792 Send node, 3773 Send node, MethodElement method, IncDecOperator operator, A arg);
4793 MethodElement method,
4794 IncDecOperator operator,
4795 A arg);
4796 3774
4797 /// Postfix operation of [operator] reading the closurized top level [method] 3775 /// Postfix operation of [operator] reading the closurized top level [method]
4798 /// and trying to invoke the non-existing setter. 3776 /// and trying to invoke the non-existing setter.
4799 /// 3777 ///
4800 /// For instance: 3778 /// For instance:
4801 /// 3779 ///
4802 /// class C { 3780 /// class C {
4803 /// foo() {} 3781 /// foo() {}
4804 /// } 3782 /// }
4805 /// m1() => C.foo++; 3783 /// m1() => C.foo++;
4806 /// 3784 ///
4807 R visitTopLevelMethodPostfix( 3785 R visitTopLevelMethodPostfix(
4808 Send node, 3786 Send node, MethodElement method, IncDecOperator operator, A arg);
4809 MethodElement method,
4810 IncDecOperator operator,
4811 A arg);
4812 3787
4813 /// Postfix operation where both getter and setter are unresolved. 3788 /// Postfix operation where both getter and setter are unresolved.
4814 /// 3789 ///
4815 /// For instance: 3790 /// For instance:
4816 /// 3791 ///
4817 /// class C {} 3792 /// class C {}
4818 /// m1() => unresolved++; 3793 /// m1() => unresolved++;
4819 /// m2() => prefix.unresolved++; 3794 /// m2() => prefix.unresolved++;
4820 /// m3() => Unresolved.foo++; 3795 /// m3() => Unresolved.foo++;
4821 /// m4() => unresolved.foo++; 3796 /// m4() => unresolved.foo++;
4822 /// m5() => unresolved.Foo.bar++; 3797 /// m5() => unresolved.Foo.bar++;
4823 /// m6() => C.unresolved++; 3798 /// m6() => C.unresolved++;
4824 /// m7() => prefix.C.unresolved++; 3799 /// m7() => prefix.C.unresolved++;
4825 /// m8() => prefix?.unresolved++; 3800 /// m8() => prefix?.unresolved++;
4826 /// m9() => Unresolved?.foo++; 3801 /// m9() => Unresolved?.foo++;
4827 /// m10() => unresolved?.foo++; 3802 /// m10() => unresolved?.foo++;
4828 /// m11() => unresolved?.Foo?.bar++; 3803 /// m11() => unresolved?.Foo?.bar++;
4829 /// 3804 ///
4830 // TODO(johnniwinther): Split the cases in which a prefix is resolved. 3805 // TODO(johnniwinther): Split the cases in which a prefix is resolved.
4831 R visitUnresolvedPostfix( 3806 R visitUnresolvedPostfix(
4832 Send node, 3807 Send node, Element element, IncDecOperator operator, A arg);
4833 Element element,
4834 IncDecOperator operator,
4835 A arg);
4836 3808
4837 /// Invocation of an undefined unary [operator] on [expression]. 3809 /// Invocation of an undefined unary [operator] on [expression].
4838 R errorUndefinedUnaryExpression( 3810 R errorUndefinedUnaryExpression(
4839 Send node, 3811 Send node, Operator operator, Node expression, A arg);
4840 Operator operator,
4841 Node expression,
4842 A arg);
4843 3812
4844 /// Invocation of an undefined unary [operator] with operands 3813 /// Invocation of an undefined unary [operator] with operands
4845 /// [left] and [right]. 3814 /// [left] and [right].
4846 R errorUndefinedBinaryExpression( 3815 R errorUndefinedBinaryExpression(
4847 Send node, 3816 Send node, Node left, Operator operator, Node right, A arg);
4848 Node left,
4849 Operator operator,
4850 Node right,
4851 A arg);
4852 3817
4853 /// Const invocation of a [constant] constructor. 3818 /// Const invocation of a [constant] constructor.
4854 /// 3819 ///
4855 /// For instance: 3820 /// For instance:
4856 /// 3821 ///
4857 /// class C<T> { 3822 /// class C<T> {
4858 /// const C(a, b); 3823 /// const C(a, b);
4859 /// } 3824 /// }
4860 /// m() => const C<int>(true, 42); 3825 /// m() => const C<int>(true, 42);
4861 /// 3826 ///
4862 R visitConstConstructorInvoke( 3827 R visitConstConstructorInvoke(
4863 NewExpression node, 3828 NewExpression node, ConstructedConstantExpression constant, A arg);
4864 ConstructedConstantExpression constant,
4865 A arg);
4866 3829
4867 /// Const invocation of the `bool.fromEnvironment` constructor. 3830 /// Const invocation of the `bool.fromEnvironment` constructor.
4868 /// 3831 ///
4869 /// For instance: 3832 /// For instance:
4870 /// 3833 ///
4871 /// m() => const bool.fromEnvironment('foo', defaultValue: false); 3834 /// m() => const bool.fromEnvironment('foo', defaultValue: false);
4872 /// 3835 ///
4873 R visitBoolFromEnvironmentConstructorInvoke( 3836 R visitBoolFromEnvironmentConstructorInvoke(NewExpression node,
4874 NewExpression node, 3837 BoolFromEnvironmentConstantExpression constant, A arg);
4875 BoolFromEnvironmentConstantExpression constant,
4876 A arg);
4877 3838
4878 /// Const invocation of the `int.fromEnvironment` constructor. 3839 /// Const invocation of the `int.fromEnvironment` constructor.
4879 /// 3840 ///
4880 /// For instance: 3841 /// For instance:
4881 /// 3842 ///
4882 /// m() => const int.fromEnvironment('foo', defaultValue: 42); 3843 /// m() => const int.fromEnvironment('foo', defaultValue: 42);
4883 /// 3844 ///
4884 R visitIntFromEnvironmentConstructorInvoke( 3845 R visitIntFromEnvironmentConstructorInvoke(
4885 NewExpression node, 3846 NewExpression node, IntFromEnvironmentConstantExpression constant, A arg);
4886 IntFromEnvironmentConstantExpression constant,
4887 A arg);
4888 3847
4889 /// Const invocation of the `String.fromEnvironment` constructor. 3848 /// Const invocation of the `String.fromEnvironment` constructor.
4890 /// 3849 ///
4891 /// For instance: 3850 /// For instance:
4892 /// 3851 ///
4893 /// m() => const String.fromEnvironment('foo', defaultValue: 'bar'); 3852 /// m() => const String.fromEnvironment('foo', defaultValue: 'bar');
4894 /// 3853 ///
4895 R visitStringFromEnvironmentConstructorInvoke( 3854 R visitStringFromEnvironmentConstructorInvoke(NewExpression node,
4896 NewExpression node, 3855 StringFromEnvironmentConstantExpression constant, A arg);
4897 StringFromEnvironmentConstantExpression constant,
4898 A arg);
4899 3856
4900 /// Invocation of a generative [constructor] on [type] with [arguments]. 3857 /// Invocation of a generative [constructor] on [type] with [arguments].
4901 /// 3858 ///
4902 /// For instance: 3859 /// For instance:
4903 /// 3860 ///
4904 /// class C<T> { 3861 /// class C<T> {
4905 /// C(a, b); 3862 /// C(a, b);
4906 /// } 3863 /// }
4907 /// m() => new C<int>(true, 42); 3864 /// m() => new C<int>(true, 42);
4908 /// 3865 ///
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
4989 /// 3946 ///
4990 /// class C<T> { 3947 /// class C<T> {
4991 /// C(); 3948 /// C();
4992 /// } 3949 /// }
4993 /// m() => new C<int>.unresolved(true, 42); 3950 /// m() => new C<int>.unresolved(true, 42);
4994 /// 3951 ///
4995 /// where [type] is `C<int>`. 3952 /// where [type] is `C<int>`.
4996 /// 3953 ///
4997 // TODO(johnniwinther): Change [type] to [InterfaceType] when is it not 3954 // TODO(johnniwinther): Change [type] to [InterfaceType] when is it not
4998 // `dynamic`. 3955 // `dynamic`.
4999 R visitUnresolvedConstructorInvoke( 3956 R visitUnresolvedConstructorInvoke(NewExpression node, Element constructor,
5000 NewExpression node, 3957 DartType type, NodeList arguments, Selector selector, A arg);
5001 Element constructor,
5002 DartType type,
5003 NodeList arguments,
5004 Selector selector,
5005 A arg);
5006 3958
5007 /// Invocation of a constructor on an unresolved [type] with [arguments]. 3959 /// Invocation of a constructor on an unresolved [type] with [arguments].
5008 /// 3960 ///
5009 /// For instance: 3961 /// For instance:
5010 /// 3962 ///
5011 /// m() => new Unresolved(true, 42); 3963 /// m() => new Unresolved(true, 42);
5012 /// 3964 ///
5013 /// where [type] is the malformed type `Unresolved`. 3965 /// where [type] is the malformed type `Unresolved`.
5014 /// 3966 ///
5015 // TODO(johnniwinther): Change [type] to [MalformedType] when is it not 3967 // TODO(johnniwinther): Change [type] to [MalformedType] when is it not
5016 // `dynamic`. 3968 // `dynamic`.
5017 R visitUnresolvedClassConstructorInvoke( 3969 R visitUnresolvedClassConstructorInvoke(NewExpression node, Element element,
5018 NewExpression node, 3970 DartType type, NodeList arguments, Selector selector, A arg);
5019 Element element,
5020 DartType type,
5021 NodeList arguments,
5022 Selector selector,
5023 A arg);
5024 3971
5025 /// Constant invocation of a non-constant constructor. 3972 /// Constant invocation of a non-constant constructor.
5026 /// 3973 ///
5027 /// For instance: 3974 /// For instance:
5028 /// 3975 ///
5029 /// class C { 3976 /// class C {
5030 /// C(a, b); 3977 /// C(a, b);
5031 /// } 3978 /// }
5032 /// m() => const C(true, 42); 3979 /// m() => const C(true, 42);
5033 /// 3980 ///
5034 R errorNonConstantConstructorInvoke( 3981 R errorNonConstantConstructorInvoke(NewExpression node, Element element,
5035 NewExpression node, 3982 DartType type, NodeList arguments, CallStructure callStructure, A arg);
5036 Element element,
5037 DartType type,
5038 NodeList arguments,
5039 CallStructure callStructure,
5040 A arg);
5041 3983
5042 /// Invocation of a constructor on an abstract [type] with [arguments]. 3984 /// Invocation of a constructor on an abstract [type] with [arguments].
5043 /// 3985 ///
5044 /// For instance: 3986 /// For instance:
5045 /// 3987 ///
5046 /// m() => new Unresolved(true, 42); 3988 /// m() => new Unresolved(true, 42);
5047 /// 3989 ///
5048 /// where [type] is the malformed type `Unresolved`. 3990 /// where [type] is the malformed type `Unresolved`.
5049 /// 3991 ///
5050 R visitAbstractClassConstructorInvoke( 3992 R visitAbstractClassConstructorInvoke(
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
5094 A arg); 4036 A arg);
5095 4037
5096 /// Read access of an invalid expression. 4038 /// Read access of an invalid expression.
5097 /// 4039 ///
5098 /// For instance: 4040 /// For instance:
5099 /// 4041 ///
5100 /// import 'foo.dart' as p; 4042 /// import 'foo.dart' as p;
5101 /// 4043 ///
5102 /// m() => p; 4044 /// m() => p;
5103 /// 4045 ///
5104 R errorInvalidGet( 4046 R errorInvalidGet(Send node, ErroneousElement error, A arg);
5105 Send node,
5106 ErroneousElement error,
5107 A arg);
5108
5109 4047
5110 /// Invocation of an invalid expression with [arguments]. 4048 /// Invocation of an invalid expression with [arguments].
5111 /// 4049 ///
5112 /// For instance: 4050 /// For instance:
5113 /// 4051 ///
5114 /// import 'foo.dart' as p; 4052 /// import 'foo.dart' as p;
5115 /// 4053 ///
5116 /// m() => p(null, 42); 4054 /// m() => p(null, 42);
5117 /// 4055 ///
5118 R errorInvalidInvoke( 4056 R errorInvalidInvoke(Send node, ErroneousElement error, NodeList arguments,
5119 Send node, 4057 Selector selector, A arg);
5120 ErroneousElement error,
5121 NodeList arguments,
5122 Selector selector,
5123 A arg);
5124 4058
5125 /// Assignment of [rhs] to an invalid expression. 4059 /// Assignment of [rhs] to an invalid expression.
5126 /// 4060 ///
5127 /// For instance: 4061 /// For instance:
5128 /// 4062 ///
5129 /// import 'foo.dart' as p; 4063 /// import 'foo.dart' as p;
5130 /// 4064 ///
5131 /// m() { p = 42; } 4065 /// m() { p = 42; }
5132 /// 4066 ///
5133 R errorInvalidSet( 4067 R errorInvalidSet(Send node, ErroneousElement error, Node rhs, A arg);
5134 Send node,
5135 ErroneousElement error,
5136 Node rhs,
5137 A arg);
5138 4068
5139 /// Prefix operation on an invalid expression. 4069 /// Prefix operation on an invalid expression.
5140 /// 4070 ///
5141 /// For instance: 4071 /// For instance:
5142 /// 4072 ///
5143 /// import 'foo.dart' as p; 4073 /// import 'foo.dart' as p;
5144 /// 4074 ///
5145 /// m() => ++p; 4075 /// m() => ++p;
5146 /// 4076 ///
5147 R errorInvalidPrefix( 4077 R errorInvalidPrefix(
5148 Send node, 4078 Send node, ErroneousElement error, IncDecOperator operator, A arg);
5149 ErroneousElement error,
5150 IncDecOperator operator,
5151 A arg);
5152 4079
5153 /// Postfix operation on an invalid expression. 4080 /// Postfix operation on an invalid expression.
5154 /// 4081 ///
5155 /// For instance: 4082 /// For instance:
5156 /// 4083 ///
5157 /// import 'foo.dart' as p; 4084 /// import 'foo.dart' as p;
5158 /// 4085 ///
5159 /// m() => p--; 4086 /// m() => p--;
5160 /// 4087 ///
5161 R errorInvalidPostfix( 4088 R errorInvalidPostfix(
5162 Send node, 4089 Send node, ErroneousElement error, IncDecOperator operator, A arg);
5163 ErroneousElement error,
5164 IncDecOperator operator,
5165 A arg);
5166 4090
5167 /// Compound assignment of [operator] with [rhs] on an invalid expression. 4091 /// Compound assignment of [operator] with [rhs] on an invalid expression.
5168 /// 4092 ///
5169 /// For instance: 4093 /// For instance:
5170 /// 4094 ///
5171 /// import 'foo.dart' as p; 4095 /// import 'foo.dart' as p;
5172 /// 4096 ///
5173 /// m() => p += 42; 4097 /// m() => p += 42;
5174 /// 4098 ///
5175 R errorInvalidCompound( 4099 R errorInvalidCompound(Send node, ErroneousElement error,
5176 Send node, 4100 AssignmentOperator operator, Node rhs, A arg);
5177 ErroneousElement error,
5178 AssignmentOperator operator,
5179 Node rhs,
5180 A arg);
5181 4101
5182 /// If-null assignment expression of [rhs] to [index] on the index operators 4102 /// If-null assignment expression of [rhs] to [index] on the index operators
5183 /// of an invalid expression. 4103 /// of an invalid expression.
5184 /// 4104 ///
5185 /// For instance: 4105 /// For instance:
5186 /// 4106 ///
5187 /// import 'foo.dart' as p; 4107 /// import 'foo.dart' as p;
5188 /// 4108 ///
5189 /// m(index, rhs) => p[index] ??= rhs; 4109 /// m(index, rhs) => p[index] ??= rhs;
5190 /// 4110 ///
5191 R errorInvalidIndexSetIfNull( 4111 R errorInvalidIndexSetIfNull(
5192 SendSet node, 4112 SendSet node, ErroneousElement error, Node index, Node rhs, A arg);
5193 ErroneousElement error,
5194 Node index,
5195 Node rhs,
5196 A arg);
5197 4113
5198 /// Unary operation with [operator] on an invalid expression. 4114 /// Unary operation with [operator] on an invalid expression.
5199 /// 4115 ///
5200 /// For instance: 4116 /// For instance:
5201 /// 4117 ///
5202 /// class C { 4118 /// class C {
5203 /// static m() => ~super; 4119 /// static m() => ~super;
5204 /// } 4120 /// }
5205 /// 4121 ///
5206 R errorInvalidUnary( 4122 R errorInvalidUnary(
5207 Send node, 4123 Send node, UnaryOperator operator, ErroneousElement error, A arg);
5208 UnaryOperator operator,
5209 ErroneousElement error,
5210 A arg);
5211 4124
5212 /// Equals operation on an invalid left expression. 4125 /// Equals operation on an invalid left expression.
5213 /// 4126 ///
5214 /// For instance: 4127 /// For instance:
5215 /// 4128 ///
5216 /// class C { 4129 /// class C {
5217 /// static m() => super == null; 4130 /// static m() => super == null;
5218 /// } 4131 /// }
5219 /// 4132 ///
5220 R errorInvalidEquals( 4133 R errorInvalidEquals(Send node, ErroneousElement error, Node right, A arg);
5221 Send node,
5222 ErroneousElement error,
5223 Node right,
5224 A arg);
5225 4134
5226 /// Not equals operation on an invalid left expression. 4135 /// Not equals operation on an invalid left expression.
5227 /// 4136 ///
5228 /// For instance: 4137 /// For instance:
5229 /// 4138 ///
5230 /// class C { 4139 /// class C {
5231 /// static m() => super != null; 4140 /// static m() => super != null;
5232 /// } 4141 /// }
5233 /// 4142 ///
5234 R errorInvalidNotEquals( 4143 R errorInvalidNotEquals(Send node, ErroneousElement error, Node right, A arg);
5235 Send node,
5236 ErroneousElement error,
5237 Node right,
5238 A arg);
5239 4144
5240 /// Binary operation with [operator] on an invalid left expression. 4145 /// Binary operation with [operator] on an invalid left expression.
5241 /// 4146 ///
5242 /// For instance: 4147 /// For instance:
5243 /// 4148 ///
5244 /// class C { 4149 /// class C {
5245 /// static m() => super + 0; 4150 /// static m() => super + 0;
5246 /// } 4151 /// }
5247 /// 4152 ///
5248 R errorInvalidBinary( 4153 R errorInvalidBinary(Send node, ErroneousElement error,
5249 Send node, 4154 BinaryOperator operator, Node right, A arg);
5250 ErroneousElement error,
5251 BinaryOperator operator,
5252 Node right,
5253 A arg);
5254 4155
5255 /// Index operation on an invalid expression. 4156 /// Index operation on an invalid expression.
5256 /// 4157 ///
5257 /// For instance: 4158 /// For instance:
5258 /// 4159 ///
5259 /// class C { 4160 /// class C {
5260 /// static m() => super[0]; 4161 /// static m() => super[0];
5261 /// } 4162 /// }
5262 /// 4163 ///
5263 R errorInvalidIndex( 4164 R errorInvalidIndex(Send node, ErroneousElement error, Node index, A arg);
5264 Send node,
5265 ErroneousElement error,
5266 Node index,
5267 A arg);
5268 4165
5269 /// Index set operation on an invalid expression. 4166 /// Index set operation on an invalid expression.
5270 /// 4167 ///
5271 /// For instance: 4168 /// For instance:
5272 /// 4169 ///
5273 /// class C { 4170 /// class C {
5274 /// static m() => super[0] = 42; 4171 /// static m() => super[0] = 42;
5275 /// } 4172 /// }
5276 /// 4173 ///
5277 R errorInvalidIndexSet( 4174 R errorInvalidIndexSet(
5278 Send node, 4175 Send node, ErroneousElement error, Node index, Node rhs, A arg);
5279 ErroneousElement error,
5280 Node index,
5281 Node rhs,
5282 A arg);
5283 4176
5284 /// Compound index set operation on an invalid expression. 4177 /// Compound index set operation on an invalid expression.
5285 /// 4178 ///
5286 /// For instance: 4179 /// For instance:
5287 /// 4180 ///
5288 /// class C { 4181 /// class C {
5289 /// static m() => super[0] += 42; 4182 /// static m() => super[0] += 42;
5290 /// } 4183 /// }
5291 /// 4184 ///
5292 R errorInvalidCompoundIndexSet( 4185 R errorInvalidCompoundIndexSet(Send node, ErroneousElement error, Node index,
5293 Send node, 4186 AssignmentOperator operator, Node rhs, A arg);
5294 ErroneousElement error,
5295 Node index,
5296 AssignmentOperator operator,
5297 Node rhs,
5298 A arg);
5299 4187
5300 /// Prefix index operation on an invalid expression. 4188 /// Prefix index operation on an invalid expression.
5301 /// 4189 ///
5302 /// For instance: 4190 /// For instance:
5303 /// 4191 ///
5304 /// class C { 4192 /// class C {
5305 /// static m() => --super[0]; 4193 /// static m() => --super[0];
5306 /// } 4194 /// }
5307 /// 4195 ///
5308 R errorInvalidIndexPrefix( 4196 R errorInvalidIndexPrefix(Send node, ErroneousElement error, Node index,
5309 Send node, 4197 IncDecOperator operator, A arg);
5310 ErroneousElement error,
5311 Node index,
5312 IncDecOperator operator,
5313 A arg);
5314 4198
5315 /// Postfix index operation on an invalid expression. 4199 /// Postfix index operation on an invalid expression.
5316 /// 4200 ///
5317 /// For instance: 4201 /// For instance:
5318 /// 4202 ///
5319 /// class C { 4203 /// class C {
5320 /// static m() => super[0]++; 4204 /// static m() => super[0]++;
5321 /// } 4205 /// }
5322 /// 4206 ///
5323 R errorInvalidIndexPostfix( 4207 R errorInvalidIndexPostfix(Send node, ErroneousElement error, Node index,
5324 Send node, 4208 IncDecOperator operator, A arg);
5325 ErroneousElement error,
5326 Node index,
5327 IncDecOperator operator,
5328 A arg);
5329 4209
5330 /// Access of library through a deferred [prefix]. 4210 /// Access of library through a deferred [prefix].
5331 /// 4211 ///
5332 /// For instance: 4212 /// For instance:
5333 /// 4213 ///
5334 /// import 'lib.dart' deferred as prefix; 4214 /// import 'lib.dart' deferred as prefix;
5335 /// 4215 ///
5336 /// m() => prefix.foo; 4216 /// m() => prefix.foo;
5337 /// 4217 ///
5338 /// This visit method is special in that it is called as a pre-step to calling 4218 /// This visit method is special in that it is called as a pre-step to calling
5339 /// the visit method for the actual access. Therefore this method cannot 4219 /// the visit method for the actual access. Therefore this method cannot
5340 /// return a result to its caller. 4220 /// return a result to its caller.
5341 void previsitDeferredAccess( 4221 void previsitDeferredAccess(Send node, PrefixElement prefix, A arg);
5342 Send node,
5343 PrefixElement prefix,
5344 A arg);
5345 } 4222 }
5346 4223
5347 abstract class SemanticDeclarationVisitor<R, A> { 4224 abstract class SemanticDeclarationVisitor<R, A> {
5348 R apply(Node node, A arg); 4225 R apply(Node node, A arg);
5349 4226
5350 /// Apply this visitor to the [parameters]. 4227 /// Apply this visitor to the [parameters].
5351 applyParameters(NodeList parameters, A arg); 4228 applyParameters(NodeList parameters, A arg);
5352 4229
5353 /// Apply this visitor to the initializers of [constructor]. 4230 /// Apply this visitor to the initializers of [constructor].
5354 applyInitializers(FunctionExpression constructor, A arg); 4231 applyInitializers(FunctionExpression constructor, A arg);
5355 4232
5356 /// A declaration of a top level [getter]. 4233 /// A declaration of a top level [getter].
5357 /// 4234 ///
5358 /// For instance: 4235 /// For instance:
5359 /// 4236 ///
5360 /// get m => 42; 4237 /// get m => 42;
5361 /// 4238 ///
5362 R visitTopLevelGetterDeclaration( 4239 R visitTopLevelGetterDeclaration(
5363 FunctionExpression node, 4240 FunctionExpression node, MethodElement getter, Node body, A arg);
5364 MethodElement getter,
5365 Node body,
5366 A arg);
5367 4241
5368 /// A declaration of a top level [setter]. 4242 /// A declaration of a top level [setter].
5369 /// 4243 ///
5370 /// For instance: 4244 /// For instance:
5371 /// 4245 ///
5372 /// set m(a) {} 4246 /// set m(a) {}
5373 /// 4247 ///
5374 R visitTopLevelSetterDeclaration( 4248 R visitTopLevelSetterDeclaration(FunctionExpression node,
5375 FunctionExpression node, 4249 MethodElement setter, NodeList parameters, Node body, A arg);
5376 MethodElement setter,
5377 NodeList parameters,
5378 Node body,
5379 A arg);
5380 4250
5381 /// A declaration of a top level [function]. 4251 /// A declaration of a top level [function].
5382 /// 4252 ///
5383 /// For instance: 4253 /// For instance:
5384 /// 4254 ///
5385 /// m(a) {} 4255 /// m(a) {}
5386 /// 4256 ///
5387 R visitTopLevelFunctionDeclaration( 4257 R visitTopLevelFunctionDeclaration(FunctionExpression node,
5388 FunctionExpression node, 4258 MethodElement function, NodeList parameters, Node body, A arg);
5389 MethodElement function,
5390 NodeList parameters,
5391 Node body,
5392 A arg);
5393 4259
5394 /// A declaration of a static [getter]. 4260 /// A declaration of a static [getter].
5395 /// 4261 ///
5396 /// For instance: 4262 /// For instance:
5397 /// 4263 ///
5398 /// class C { 4264 /// class C {
5399 /// static get m => 42; 4265 /// static get m => 42;
5400 /// } 4266 /// }
5401 /// 4267 ///
5402 R visitStaticGetterDeclaration( 4268 R visitStaticGetterDeclaration(
5403 FunctionExpression node, 4269 FunctionExpression node, MethodElement getter, Node body, A arg);
5404 MethodElement getter,
5405 Node body,
5406 A arg);
5407 4270
5408 /// A declaration of a static [setter]. 4271 /// A declaration of a static [setter].
5409 /// 4272 ///
5410 /// For instance: 4273 /// For instance:
5411 /// 4274 ///
5412 /// class C { 4275 /// class C {
5413 /// static set m(a) {} 4276 /// static set m(a) {}
5414 /// } 4277 /// }
5415 /// 4278 ///
5416 R visitStaticSetterDeclaration( 4279 R visitStaticSetterDeclaration(FunctionExpression node, MethodElement setter,
5417 FunctionExpression node, 4280 NodeList parameters, Node body, A arg);
5418 MethodElement setter,
5419 NodeList parameters,
5420 Node body,
5421 A arg);
5422 4281
5423 /// A declaration of a static [function]. 4282 /// A declaration of a static [function].
5424 /// 4283 ///
5425 /// For instance: 4284 /// For instance:
5426 /// 4285 ///
5427 /// class C { 4286 /// class C {
5428 /// static m(a) {} 4287 /// static m(a) {}
5429 /// } 4288 /// }
5430 /// 4289 ///
5431 R visitStaticFunctionDeclaration( 4290 R visitStaticFunctionDeclaration(FunctionExpression node,
5432 FunctionExpression node, 4291 MethodElement function, NodeList parameters, Node body, A arg);
5433 MethodElement function,
5434 NodeList parameters,
5435 Node body,
5436 A arg);
5437 4292
5438 /// A declaration of an abstract instance [getter]. 4293 /// A declaration of an abstract instance [getter].
5439 /// 4294 ///
5440 /// For instance: 4295 /// For instance:
5441 /// 4296 ///
5442 /// abstract class C { 4297 /// abstract class C {
5443 /// get m; 4298 /// get m;
5444 /// } 4299 /// }
5445 /// 4300 ///
5446 R visitAbstractGetterDeclaration( 4301 R visitAbstractGetterDeclaration(
5447 FunctionExpression node, 4302 FunctionExpression node, MethodElement getter, A arg);
5448 MethodElement getter,
5449 A arg);
5450 4303
5451 /// A declaration of an abstract instance [setter]. 4304 /// A declaration of an abstract instance [setter].
5452 /// 4305 ///
5453 /// For instance: 4306 /// For instance:
5454 /// 4307 ///
5455 /// abstract class C { 4308 /// abstract class C {
5456 /// set m(a); 4309 /// set m(a);
5457 /// } 4310 /// }
5458 /// 4311 ///
5459 R visitAbstractSetterDeclaration( 4312 R visitAbstractSetterDeclaration(FunctionExpression node,
5460 FunctionExpression node, 4313 MethodElement setter, NodeList parameters, A arg);
5461 MethodElement setter,
5462 NodeList parameters,
5463 A arg);
5464 4314
5465 /// A declaration of an abstract instance [method]. 4315 /// A declaration of an abstract instance [method].
5466 /// 4316 ///
5467 /// For instance: 4317 /// For instance:
5468 /// 4318 ///
5469 /// abstract class C { 4319 /// abstract class C {
5470 /// m(a); 4320 /// m(a);
5471 /// } 4321 /// }
5472 /// 4322 ///
5473 R visitAbstractMethodDeclaration( 4323 R visitAbstractMethodDeclaration(FunctionExpression node,
5474 FunctionExpression node, 4324 MethodElement method, NodeList parameters, A arg);
5475 MethodElement method,
5476 NodeList parameters,
5477 A arg);
5478 4325
5479 /// A declaration of an instance [getter]. 4326 /// A declaration of an instance [getter].
5480 /// 4327 ///
5481 /// For instance: 4328 /// For instance:
5482 /// 4329 ///
5483 /// class C { 4330 /// class C {
5484 /// get m => 42; 4331 /// get m => 42;
5485 /// } 4332 /// }
5486 /// 4333 ///
5487 R visitInstanceGetterDeclaration( 4334 R visitInstanceGetterDeclaration(
5488 FunctionExpression node, 4335 FunctionExpression node, MethodElement getter, Node body, A arg);
5489 MethodElement getter,
5490 Node body,
5491 A arg);
5492 4336
5493 /// A declaration of an instance [setter]. 4337 /// A declaration of an instance [setter].
5494 /// 4338 ///
5495 /// For instance: 4339 /// For instance:
5496 /// 4340 ///
5497 /// class C { 4341 /// class C {
5498 /// set m(a) {} 4342 /// set m(a) {}
5499 /// } 4343 /// }
5500 /// 4344 ///
5501 R visitInstanceSetterDeclaration( 4345 R visitInstanceSetterDeclaration(FunctionExpression node,
5502 FunctionExpression node, 4346 MethodElement setter, NodeList parameters, Node body, A arg);
5503 MethodElement setter,
5504 NodeList parameters,
5505 Node body,
5506 A arg);
5507 4347
5508 /// A declaration of an instance [method]. 4348 /// A declaration of an instance [method].
5509 /// 4349 ///
5510 /// For instance: 4350 /// For instance:
5511 /// 4351 ///
5512 /// class C { 4352 /// class C {
5513 /// m(a) {} 4353 /// m(a) {}
5514 /// } 4354 /// }
5515 /// 4355 ///
5516 R visitInstanceMethodDeclaration( 4356 R visitInstanceMethodDeclaration(FunctionExpression node,
5517 FunctionExpression node, 4357 MethodElement method, NodeList parameters, Node body, A arg);
5518 MethodElement method,
5519 NodeList parameters,
5520 Node body,
5521 A arg);
5522 4358
5523 /// A declaration of a local [function]. 4359 /// A declaration of a local [function].
5524 /// 4360 ///
5525 /// For instance `local` in: 4361 /// For instance `local` in:
5526 /// 4362 ///
5527 /// m() { 4363 /// m() {
5528 /// local(a) {} 4364 /// local(a) {}
5529 /// } 4365 /// }
5530 /// 4366 ///
5531 R visitLocalFunctionDeclaration( 4367 R visitLocalFunctionDeclaration(FunctionExpression node,
5532 FunctionExpression node, 4368 LocalFunctionElement function, NodeList parameters, Node body, A arg);
5533 LocalFunctionElement function,
5534 NodeList parameters,
5535 Node body,
5536 A arg);
5537 4369
5538 /// A declaration of a [closure]. 4370 /// A declaration of a [closure].
5539 /// 4371 ///
5540 /// For instance `(a) {}` in: 4372 /// For instance `(a) {}` in:
5541 /// 4373 ///
5542 /// m() { 4374 /// m() {
5543 /// var closure = (a) {}; 4375 /// var closure = (a) {};
5544 /// } 4376 /// }
5545 /// 4377 ///
5546 R visitClosureDeclaration( 4378 R visitClosureDeclaration(FunctionExpression node,
5547 FunctionExpression node, 4379 LocalFunctionElement closure, NodeList parameters, Node body, A arg);
5548 LocalFunctionElement closure,
5549 NodeList parameters,
5550 Node body,
5551 A arg);
5552 4380
5553 /// A declaration of the [index]th [parameter] in a constructor, setter, 4381 /// A declaration of the [index]th [parameter] in a constructor, setter,
5554 /// method or function. 4382 /// method or function.
5555 /// 4383 ///
5556 /// For instance `a` in: 4384 /// For instance `a` in:
5557 /// 4385 ///
5558 /// m(a) {} 4386 /// m(a) {}
5559 /// 4387 ///
5560 R visitParameterDeclaration( 4388 R visitParameterDeclaration(VariableDefinitions node, Node definition,
5561 VariableDefinitions node, 4389 ParameterElement parameter, int index, A arg);
5562 Node definition,
5563 ParameterElement parameter,
5564 int index,
5565 A arg);
5566 4390
5567 /// A declaration of the [index]th optional [parameter] in a constructor, 4391 /// A declaration of the [index]th optional [parameter] in a constructor,
5568 /// method or function with the explicit [defaultValue]. If no default value 4392 /// method or function with the explicit [defaultValue]. If no default value
5569 /// is declared, [defaultValue] is `null`. 4393 /// is declared, [defaultValue] is `null`.
5570 /// 4394 ///
5571 /// For instance `a` in: 4395 /// For instance `a` in:
5572 /// 4396 ///
5573 /// m([a = 42]) {} 4397 /// m([a = 42]) {}
5574 /// 4398 ///
5575 R visitOptionalParameterDeclaration( 4399 R visitOptionalParameterDeclaration(
5576 VariableDefinitions node, 4400 VariableDefinitions node,
5577 Node definition, 4401 Node definition,
5578 ParameterElement parameter, 4402 ParameterElement parameter,
5579 ConstantExpression defaultValue, 4403 ConstantExpression defaultValue,
5580 int index, 4404 int index,
5581 A arg); 4405 A arg);
5582 4406
5583 /// A declaration of a named [parameter] in a constructor, method or function 4407 /// A declaration of a named [parameter] in a constructor, method or function
5584 /// with the explicit [defaultValue]. If no default value is declared, 4408 /// with the explicit [defaultValue]. If no default value is declared,
5585 /// [defaultValue] is `null`. 4409 /// [defaultValue] is `null`.
5586 /// 4410 ///
5587 /// For instance `a` in: 4411 /// For instance `a` in:
5588 /// 4412 ///
5589 /// m({a: 42}) {} 4413 /// m({a: 42}) {}
5590 /// 4414 ///
5591 R visitNamedParameterDeclaration( 4415 R visitNamedParameterDeclaration(VariableDefinitions node, Node definition,
5592 VariableDefinitions node, 4416 ParameterElement parameter, ConstantExpression defaultValue, A arg);
5593 Node definition,
5594 ParameterElement parameter,
5595 ConstantExpression defaultValue,
5596 A arg);
5597 4417
5598 /// A declaration of the [index]th [parameter] as an initializing formal in a 4418 /// A declaration of the [index]th [parameter] as an initializing formal in a
5599 /// constructor. 4419 /// constructor.
5600 /// 4420 ///
5601 /// For instance `a` in: 4421 /// For instance `a` in:
5602 /// 4422 ///
5603 /// class C { 4423 /// class C {
5604 /// var a; 4424 /// var a;
5605 /// C(this.a); 4425 /// C(this.a);
5606 /// } 4426 /// }
5607 /// 4427 ///
5608 R visitInitializingFormalDeclaration( 4428 R visitInitializingFormalDeclaration(VariableDefinitions node,
5609 VariableDefinitions node, 4429 Node definition, InitializingFormalElement parameter, int index, A arg);
5610 Node definition,
5611 InitializingFormalElement parameter,
5612 int index,
5613 A arg);
5614 4430
5615 /// A declaration of the [index]th optional [parameter] as an initializing 4431 /// A declaration of the [index]th optional [parameter] as an initializing
5616 /// formal in a constructor with the explicit [defaultValue]. If no default 4432 /// formal in a constructor with the explicit [defaultValue]. If no default
5617 /// value is declared, [defaultValue] is `null`. 4433 /// value is declared, [defaultValue] is `null`.
5618 /// 4434 ///
5619 /// For instance `a` in: 4435 /// For instance `a` in:
5620 /// 4436 ///
5621 /// class C { 4437 /// class C {
5622 /// var a; 4438 /// var a;
5623 /// C([this.a = 42]); 4439 /// C([this.a = 42]);
(...skipping 27 matching lines...) Expand all
5651 4467
5652 /// A declaration of a local [variable] with the explicit [initializer]. If 4468 /// A declaration of a local [variable] with the explicit [initializer]. If
5653 /// no initializer is declared, [initializer] is `null`. 4469 /// no initializer is declared, [initializer] is `null`.
5654 /// 4470 ///
5655 /// For instance `a` in: 4471 /// For instance `a` in:
5656 /// 4472 ///
5657 /// m() { 4473 /// m() {
5658 /// var a = 42; 4474 /// var a = 42;
5659 /// } 4475 /// }
5660 /// 4476 ///
5661 R visitLocalVariableDeclaration( 4477 R visitLocalVariableDeclaration(VariableDefinitions node, Node definition,
5662 VariableDefinitions node, 4478 LocalVariableElement variable, Node initializer, A arg);
5663 Node definition,
5664 LocalVariableElement variable,
5665 Node initializer,
5666 A arg);
5667 4479
5668 /// A declaration of a local constant [variable] initialized to [constant]. 4480 /// A declaration of a local constant [variable] initialized to [constant].
5669 /// 4481 ///
5670 /// For instance `a` in: 4482 /// For instance `a` in:
5671 /// 4483 ///
5672 /// m() { 4484 /// m() {
5673 /// const a = 42; 4485 /// const a = 42;
5674 /// } 4486 /// }
5675 /// 4487 ///
5676 R visitLocalConstantDeclaration( 4488 R visitLocalConstantDeclaration(VariableDefinitions node, Node definition,
5677 VariableDefinitions node, 4489 LocalVariableElement variable, ConstantExpression constant, A arg);
5678 Node definition,
5679 LocalVariableElement variable,
5680 ConstantExpression constant,
5681 A arg);
5682 4490
5683 /// A declaration of a top level [field] with the explicit [initializer]. 4491 /// A declaration of a top level [field] with the explicit [initializer].
5684 /// If no initializer is declared, [initializer] is `null`. 4492 /// If no initializer is declared, [initializer] is `null`.
5685 /// 4493 ///
5686 /// For instance `a` in: 4494 /// For instance `a` in:
5687 /// 4495 ///
5688 /// var a = 42; 4496 /// var a = 42;
5689 /// 4497 ///
5690 R visitTopLevelFieldDeclaration( 4498 R visitTopLevelFieldDeclaration(VariableDefinitions node, Node definition,
5691 VariableDefinitions node, 4499 FieldElement field, Node initializer, A arg);
5692 Node definition,
5693 FieldElement field,
5694 Node initializer,
5695 A arg);
5696 4500
5697 /// A declaration of a top level constant [field] initialized to [constant]. 4501 /// A declaration of a top level constant [field] initialized to [constant].
5698 /// 4502 ///
5699 /// For instance `a` in: 4503 /// For instance `a` in:
5700 /// 4504 ///
5701 /// const a = 42; 4505 /// const a = 42;
5702 /// 4506 ///
5703 R visitTopLevelConstantDeclaration( 4507 R visitTopLevelConstantDeclaration(VariableDefinitions node, Node definition,
5704 VariableDefinitions node, 4508 FieldElement field, ConstantExpression constant, A arg);
5705 Node definition,
5706 FieldElement field,
5707 ConstantExpression constant,
5708 A arg);
5709 4509
5710 /// A declaration of a static [field] with the explicit [initializer]. 4510 /// A declaration of a static [field] with the explicit [initializer].
5711 /// If no initializer is declared, [initializer] is `null`. 4511 /// If no initializer is declared, [initializer] is `null`.
5712 /// 4512 ///
5713 /// For instance `a` in: 4513 /// For instance `a` in:
5714 /// 4514 ///
5715 /// class C { 4515 /// class C {
5716 /// static var a = 42; 4516 /// static var a = 42;
5717 /// } 4517 /// }
5718 /// 4518 ///
5719 R visitStaticFieldDeclaration( 4519 R visitStaticFieldDeclaration(VariableDefinitions node, Node definition,
5720 VariableDefinitions node, 4520 FieldElement field, Node initializer, A arg);
5721 Node definition,
5722 FieldElement field,
5723 Node initializer,
5724 A arg);
5725 4521
5726 /// A declaration of a static constant [field] initialized to [constant]. 4522 /// A declaration of a static constant [field] initialized to [constant].
5727 /// 4523 ///
5728 /// For instance `a` in: 4524 /// For instance `a` in:
5729 /// 4525 ///
5730 /// class C { 4526 /// class C {
5731 /// static const a = 42; 4527 /// static const a = 42;
5732 /// } 4528 /// }
5733 /// 4529 ///
5734 R visitStaticConstantDeclaration( 4530 R visitStaticConstantDeclaration(VariableDefinitions node, Node definition,
5735 VariableDefinitions node, 4531 FieldElement field, ConstantExpression constant, A arg);
5736 Node definition,
5737 FieldElement field,
5738 ConstantExpression constant,
5739 A arg);
5740 4532
5741 /// A declaration of an instance [field] with the explicit [initializer]. 4533 /// A declaration of an instance [field] with the explicit [initializer].
5742 /// If no initializer is declared, [initializer] is `null`. 4534 /// If no initializer is declared, [initializer] is `null`.
5743 /// 4535 ///
5744 /// For instance `a` in: 4536 /// For instance `a` in:
5745 /// 4537 ///
5746 /// class C { 4538 /// class C {
5747 /// var a = 42; 4539 /// var a = 42;
5748 /// } 4540 /// }
5749 /// 4541 ///
5750 R visitInstanceFieldDeclaration( 4542 R visitInstanceFieldDeclaration(VariableDefinitions node, Node definition,
5751 VariableDefinitions node, 4543 FieldElement field, Node initializer, A arg);
5752 Node definition,
5753 FieldElement field,
5754 Node initializer,
5755 A arg);
5756 4544
5757 /// A declaration of a generative [constructor] with the explicit constructor 4545 /// A declaration of a generative [constructor] with the explicit constructor
5758 /// [initializers]. 4546 /// [initializers].
5759 /// 4547 ///
5760 /// For instance `C` in: 4548 /// For instance `C` in:
5761 /// 4549 ///
5762 /// class C { 4550 /// class C {
5763 /// var a; 4551 /// var a;
5764 /// C(a) : this.a = a, super(); 4552 /// C(a) : this.a = a, super();
5765 /// } 4553 /// }
(...skipping 28 matching lines...) Expand all
5794 A arg); 4582 A arg);
5795 4583
5796 /// A declaration of a factory [constructor]. 4584 /// A declaration of a factory [constructor].
5797 /// 4585 ///
5798 /// For instance `C` in: 4586 /// For instance `C` in:
5799 /// 4587 ///
5800 /// class C { 4588 /// class C {
5801 /// factory C(a) => null; 4589 /// factory C(a) => null;
5802 /// } 4590 /// }
5803 /// 4591 ///
5804 R visitFactoryConstructorDeclaration( 4592 R visitFactoryConstructorDeclaration(FunctionExpression node,
5805 FunctionExpression node, 4593 ConstructorElement constructor, NodeList parameters, Node body, A arg);
5806 ConstructorElement constructor,
5807 NodeList parameters,
5808 Node body,
5809 A arg);
5810 4594
5811 /// A declaration of a redirecting factory [constructor]. The immediate 4595 /// A declaration of a redirecting factory [constructor]. The immediate
5812 /// redirection target and its type is provided in [redirectionTarget] and 4596 /// redirection target and its type is provided in [redirectionTarget] and
5813 /// [redirectionType], respectively. 4597 /// [redirectionType], respectively.
5814 /// 4598 ///
5815 /// For instance: 4599 /// For instance:
5816 /// 4600 ///
5817 /// class C<T> { 4601 /// class C<T> {
5818 /// factory C() = C<int>.a; 4602 /// factory C() = C<int>.a;
5819 /// factory C.a() = C<C<T>>.b; 4603 /// factory C.a() = C<C<T>>.b;
(...skipping 14 matching lines...) Expand all
5834 /// initializers. 4618 /// initializers.
5835 /// 4619 ///
5836 /// For instance `this.a = 42` in: 4620 /// For instance `this.a = 42` in:
5837 /// 4621 ///
5838 /// class C { 4622 /// class C {
5839 /// var a; 4623 /// var a;
5840 /// C() : this.a = 42; 4624 /// C() : this.a = 42;
5841 /// } 4625 /// }
5842 /// 4626 ///
5843 R visitFieldInitializer( 4627 R visitFieldInitializer(
5844 SendSet node, 4628 SendSet node, FieldElement field, Node initializer, A arg);
5845 FieldElement field,
5846 Node initializer,
5847 A arg);
5848 4629
5849 /// An initializer of an unresolved field with [initializer] as found in 4630 /// An initializer of an unresolved field with [initializer] as found in
5850 /// generative constructor initializers. 4631 /// generative constructor initializers.
5851 /// 4632 ///
5852 /// For instance `this.a = 42` in: 4633 /// For instance `this.a = 42` in:
5853 /// 4634 ///
5854 /// class C { 4635 /// class C {
5855 /// C() : this.a = 42; 4636 /// C() : this.a = 42;
5856 /// } 4637 /// }
5857 /// 4638 ///
5858 R errorUnresolvedFieldInitializer( 4639 R errorUnresolvedFieldInitializer(
5859 SendSet node, 4640 SendSet node, Element element, Node initializer, A arg);
5860 Element element,
5861 Node initializer,
5862 A arg);
5863 4641
5864 /// An super constructor invocation of [superConstructor] with [arguments] as 4642 /// An super constructor invocation of [superConstructor] with [arguments] as
5865 /// found in generative constructor initializers. 4643 /// found in generative constructor initializers.
5866 /// 4644 ///
5867 /// For instance `super(42)` in: 4645 /// For instance `super(42)` in:
5868 /// 4646 ///
5869 /// class B { 4647 /// class B {
5870 /// B(a); 4648 /// B(a);
5871 /// } 4649 /// }
5872 /// class C extends B { 4650 /// class C extends B {
(...skipping 13 matching lines...) Expand all
5886 /// 4664 ///
5887 /// For instance `super(42)` in: 4665 /// For instance `super(42)` in:
5888 /// 4666 ///
5889 /// class B { 4667 /// class B {
5890 /// B(); 4668 /// B();
5891 /// } 4669 /// }
5892 /// class C extends B { 4670 /// class C extends B {
5893 /// C(); // Implicit super call of B(). 4671 /// C(); // Implicit super call of B().
5894 /// } 4672 /// }
5895 /// 4673 ///
5896 R visitImplicitSuperConstructorInvoke( 4674 R visitImplicitSuperConstructorInvoke(FunctionExpression node,
5897 FunctionExpression node, 4675 ConstructorElement superConstructor, InterfaceType type, A arg);
5898 ConstructorElement superConstructor,
5899 InterfaceType type,
5900 A arg);
5901 4676
5902 /// An super constructor invocation of an unresolved with [arguments] as 4677 /// An super constructor invocation of an unresolved with [arguments] as
5903 /// found in generative constructor initializers. 4678 /// found in generative constructor initializers.
5904 /// 4679 ///
5905 /// For instance `super(42)` in: 4680 /// For instance `super(42)` in:
5906 /// 4681 ///
5907 /// class B { 4682 /// class B {
5908 /// B(a); 4683 /// B(a);
5909 /// } 4684 /// }
5910 /// class C extends B { 4685 /// class C extends B {
5911 /// C() : super.unresolved(42); 4686 /// C() : super.unresolved(42);
5912 /// } 4687 /// }
5913 /// 4688 ///
5914 R errorUnresolvedSuperConstructorInvoke( 4689 R errorUnresolvedSuperConstructorInvoke(
5915 Send node, 4690 Send node, Element element, NodeList arguments, Selector selector, A arg);
5916 Element element,
5917 NodeList arguments,
5918 Selector selector,
5919 A arg);
5920 4691
5921 /// An this constructor invocation of [thisConstructor] with [arguments] as 4692 /// An this constructor invocation of [thisConstructor] with [arguments] as
5922 /// found in a redirecting generative constructors initializer. 4693 /// found in a redirecting generative constructors initializer.
5923 /// 4694 ///
5924 /// For instance `this._(42)` in: 4695 /// For instance `this._(42)` in:
5925 /// 4696 ///
5926 /// class C { 4697 /// class C {
5927 /// C() : this._(42); 4698 /// C() : this._(42);
5928 /// C._(a); 4699 /// C._(a);
5929 /// } 4700 /// }
5930 /// 4701 ///
5931 R visitThisConstructorInvoke( 4702 R visitThisConstructorInvoke(Send node, ConstructorElement thisConstructor,
5932 Send node, 4703 NodeList arguments, CallStructure callStructure, A arg);
5933 ConstructorElement thisConstructor,
5934 NodeList arguments,
5935 CallStructure callStructure,
5936 A arg);
5937 4704
5938 /// An this constructor invocation of an unresolved constructor with 4705 /// An this constructor invocation of an unresolved constructor with
5939 /// [arguments] as found in a redirecting generative constructors initializer. 4706 /// [arguments] as found in a redirecting generative constructors initializer.
5940 /// 4707 ///
5941 /// For instance `this._(42)` in: 4708 /// For instance `this._(42)` in:
5942 /// 4709 ///
5943 /// class C { 4710 /// class C {
5944 /// C() : this._(42); 4711 /// C() : this._(42);
5945 /// } 4712 /// }
5946 /// 4713 ///
5947 R errorUnresolvedThisConstructorInvoke( 4714 R errorUnresolvedThisConstructorInvoke(
5948 Send node, 4715 Send node, Element element, NodeList arguments, Selector selector, A arg);
5949 Element element,
5950 NodeList arguments,
5951 Selector selector,
5952 A arg);
5953 } 4716 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/secret_tree_element.dart ('k') | pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698