Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 library dart2js.semantics_visitor; | |
| 6 | |
| 7 import '../elements/elements.dart'; | |
| 8 import 'resolution.dart'; | |
| 9 import 'access_semantics.dart'; | |
| 10 import 'send_structure.dart'; | |
| 11 import 'operators.dart'; | |
| 12 import '../tree/tree.dart'; | |
| 13 import '../universe/universe.dart'; | |
| 14 import '../util/util.dart' show Spannable, SpannableAssertionFailure; | |
| 15 import '../dart_types.dart'; | |
| 16 | |
| 17 enum SendStructureKind { | |
| 18 GET, | |
| 19 SET, | |
| 20 INVOKE, | |
| 21 UNARY, | |
| 22 NOT, | |
| 23 BINARY, | |
| 24 EQ, | |
| 25 NOT_EQ, | |
| 26 COMPOUND, | |
| 27 INDEX_SET, | |
| 28 COMPOUND_INDEX_SET, | |
| 29 PREFIX, | |
| 30 POSTFIX, | |
| 31 } | |
| 32 | |
| 33 abstract class SendResolverMixin { | |
| 34 TreeElements get elements; | |
| 35 | |
| 36 internalError(Spannable spannable, String message); | |
| 37 | |
| 38 AccessSemantics handleStaticallyResolvedAccess(Send node, | |
| 39 Element element, | |
| 40 Element getter) { | |
| 41 if (element.isParameter) { | |
| 42 return new AccessSemantics.parameter(element); | |
| 43 } else if (element.isLocal) { | |
| 44 if (element.isFunction) { | |
| 45 return new AccessSemantics.localFunction(element); | |
| 46 } else { | |
| 47 return new AccessSemantics.localVariable(element); | |
| 48 } | |
| 49 } else if (element.isStatic) { | |
| 50 if (element.isField) { | |
| 51 return new AccessSemantics.staticField(element, element.enclosingClass); | |
| 52 } else if (element.isGetter) { | |
| 53 return new AccessSemantics.staticGetter( | |
| 54 element, | |
| 55 element.enclosingClass); | |
| 56 } else if (element.isSetter) { | |
| 57 if (getter != null) { | |
| 58 CompoundAccessKind accessKind; | |
| 59 if (getter.isGetter) { | |
| 60 accessKind = CompoundAccessKind.STATIC_GETTER_SETTER; | |
| 61 } else { | |
| 62 accessKind = CompoundAccessKind.STATIC_METHOD_SETTER; | |
| 63 } | |
| 64 return new CompoundAccessSemantics( | |
| 65 accessKind, getter, element, | |
| 66 classElement: element.enclosingClass); | |
| 67 } else { | |
| 68 return new AccessSemantics.staticSetter( | |
| 69 element, | |
| 70 element.enclosingClass); | |
| 71 } | |
| 72 } else { | |
| 73 return new AccessSemantics.staticMethod( | |
| 74 element, | |
| 75 element.enclosingClass); | |
| 76 } | |
| 77 } else if (element.isTopLevel) { | |
| 78 if (element.isField) { | |
| 79 return new AccessSemantics.topLevelField(element); | |
| 80 } else if (element.isGetter) { | |
| 81 return new AccessSemantics.topLevelGetter(element); | |
| 82 } else if (element.isSetter) { | |
| 83 if (getter != null) { | |
| 84 CompoundAccessKind accessKind; | |
| 85 if (getter.isGetter) { | |
| 86 accessKind = CompoundAccessKind.TOPLEVEL_GETTER_SETTER; | |
| 87 } else { | |
| 88 accessKind = CompoundAccessKind.TOPLEVEL_METHOD_SETTER; | |
| 89 } | |
| 90 return new CompoundAccessSemantics( | |
| 91 accessKind, getter, element); | |
| 92 } else { | |
| 93 return new AccessSemantics.topLevelSetter(element); | |
| 94 } | |
| 95 } else { | |
| 96 return new AccessSemantics.topLevelMethod(element); | |
| 97 } | |
| 98 } else { | |
| 99 return internalError( | |
| 100 node, "Unhandled resolved property access: $element"); | |
| 101 } | |
| 102 } | |
| 103 | |
| 104 | |
| 105 SendStructure computeSendStructure(Send node) { | |
| 106 if (elements.isAssert(node)) { | |
| 107 return const AssertStructure(); | |
| 108 } | |
| 109 | |
| 110 AssignmentOperator assignmentOperator; | |
| 111 UnaryOperator unaryOperator; | |
| 112 BinaryOperator binaryOperator; | |
| 113 IncDecOperator incDecOperator; | |
| 114 | |
| 115 if (node.isOperator) { | |
| 116 String operatorText = node.selector.asOperator().source; | |
| 117 if (operatorText == 'is') { | |
| 118 if (node.isIsNotCheck) { | |
| 119 return new IsNotStructure( | |
| 120 elements.getType(node.arguments.single.asSend().receiver)); | |
| 121 } else { | |
| 122 return new IsStructure(elements.getType(node.arguments.single)); | |
| 123 } | |
| 124 } else if (operatorText == 'as') { | |
| 125 return new AsStructure(elements.getType(node.arguments.single)); | |
| 126 } else if (operatorText == '&&') { | |
| 127 return const LazyAndStructure(); | |
| 128 } else if (operatorText == '||') { | |
| 129 return const LazyOrStructure(); | |
| 130 } | |
| 131 } | |
| 132 | |
| 133 SendStructureKind kind; | |
| 134 | |
| 135 if (node.asSendSet() != null) { | |
| 136 SendSet sendSet = node.asSendSet(); | |
| 137 String operatorText = sendSet.assignmentOperator.source; | |
| 138 if (sendSet.isPrefix || sendSet.isPostfix) { | |
| 139 kind = sendSet.isPrefix | |
| 140 ? SendStructureKind.PREFIX | |
| 141 : SendStructureKind.POSTFIX; | |
| 142 incDecOperator = IncDecOperator.parse(operatorText); | |
| 143 if (incDecOperator == null) { | |
| 144 return internalError( | |
| 145 node, "No inc/dec operator for '$operatorText'."); | |
| 146 } | |
| 147 } else { | |
| 148 assignmentOperator = AssignmentOperator.parse(operatorText); | |
| 149 if (assignmentOperator != null) { | |
| 150 switch (assignmentOperator.kind) { | |
| 151 case AssignmentOperatorKind.ASSIGN: | |
| 152 kind = SendStructureKind.SET; | |
| 153 break; | |
| 154 default: | |
| 155 kind = SendStructureKind.COMPOUND; | |
| 156 } | |
| 157 } else { | |
| 158 return internalError( | |
| 159 node, "No assignment operator for '$operatorText'."); | |
| 160 } | |
| 161 } | |
| 162 } else if (!node.isPropertyAccess) { | |
| 163 kind = SendStructureKind.INVOKE; | |
| 164 } else { | |
| 165 kind = SendStructureKind.GET; | |
| 166 } | |
| 167 | |
| 168 if (node.isOperator) { | |
| 169 String operatorText = node.selector.asOperator().source; | |
| 170 if (node.arguments.isEmpty) { | |
| 171 unaryOperator = UnaryOperator.parse(operatorText); | |
| 172 if (unaryOperator != null) { | |
| 173 switch (unaryOperator.kind) { | |
| 174 case UnaryOperatorKind.NOT: | |
| 175 kind = SendStructureKind.NOT; | |
| 176 break; | |
| 177 default: | |
| 178 kind = SendStructureKind.UNARY; | |
| 179 break; | |
| 180 } | |
| 181 } else { | |
| 182 return internalError(node, "No unary operator for '$operatorText'."); | |
| 183 } | |
| 184 } else { | |
| 185 binaryOperator = BinaryOperator.parse(operatorText); | |
| 186 if (binaryOperator != null) { | |
| 187 switch (binaryOperator.kind) { | |
| 188 case BinaryOperatorKind.EQ: | |
| 189 kind = SendStructureKind.EQ; | |
| 190 break; | |
| 191 case BinaryOperatorKind.NOT_EQ: | |
| 192 kind = SendStructureKind.NOT_EQ; | |
| 193 break; | |
| 194 case BinaryOperatorKind.INDEX: | |
| 195 if (node.arguments.tail.isEmpty) { | |
| 196 // a[b] | |
| 197 kind = SendStructureKind.BINARY; | |
| 198 } else { | |
| 199 if (kind == SendStructureKind.COMPOUND) { | |
| 200 // a[b] += c | |
| 201 kind = SendStructureKind.COMPOUND_INDEX_SET; | |
| 202 } else { | |
| 203 // a[b] = c | |
| 204 kind = SendStructureKind.INDEX_SET; | |
| 205 } | |
| 206 } | |
| 207 break; | |
| 208 default: | |
| 209 kind = SendStructureKind.BINARY; | |
| 210 break; | |
| 211 } | |
| 212 } else { | |
| 213 return internalError(node, "No binary operator for '$operatorText'."); | |
| 214 } | |
| 215 } | |
| 216 } | |
| 217 AccessSemantics semantics = computeAccessSemantics( | |
| 218 node, | |
| 219 isGetOrSet: kind == SendStructureKind.GET || | |
| 220 kind == SendStructureKind.SET, | |
| 221 isCompound: kind == SendStructureKind.COMPOUND || | |
| 222 kind == SendStructureKind.COMPOUND_INDEX_SET || | |
| 223 kind == SendStructureKind.PREFIX || | |
| 224 kind == SendStructureKind.POSTFIX); | |
| 225 if (semantics == null) { | |
| 226 internalError(node, 'No semantics for $node'); | |
| 227 } | |
| 228 Selector selector = elements.getSelector(node); | |
| 229 switch (kind) { | |
| 230 case SendStructureKind.GET: | |
| 231 return new GetStructure(semantics, selector); | |
| 232 case SendStructureKind.SET: | |
| 233 return new SetStructure(semantics, selector); | |
| 234 case SendStructureKind.INVOKE: | |
| 235 return new InvokeStructure(semantics, selector); | |
| 236 case SendStructureKind.UNARY: | |
| 237 return new UnaryStructure(semantics, unaryOperator, selector); | |
| 238 case SendStructureKind.NOT: | |
| 239 return new NotStructure(semantics, selector); | |
| 240 case SendStructureKind.BINARY: | |
| 241 return new BinaryStructure(semantics, binaryOperator, selector); | |
| 242 case SendStructureKind.EQ: | |
| 243 return new EqualsStructure(semantics, selector); | |
| 244 case SendStructureKind.NOT_EQ: | |
| 245 return new NotEqualsStructure(semantics, selector); | |
| 246 case SendStructureKind.COMPOUND: | |
| 247 Selector getterSelector = | |
| 248 elements.getGetterSelectorInComplexSendSet(node); | |
| 249 return new CompoundStructure( | |
| 250 semantics, | |
| 251 assignmentOperator, | |
| 252 getterSelector, | |
| 253 selector); | |
| 254 case SendStructureKind.INDEX_SET: | |
| 255 return new IndexSetStructure(semantics, selector); | |
| 256 case SendStructureKind.COMPOUND_INDEX_SET: | |
| 257 Selector getterSelector = | |
| 258 elements.getGetterSelectorInComplexSendSet(node); | |
| 259 return new CompoundIndexSetStructure( | |
| 260 semantics, | |
| 261 assignmentOperator, | |
| 262 getterSelector, | |
| 263 selector); | |
| 264 case SendStructureKind.PREFIX: | |
| 265 Selector getterSelector = | |
| 266 elements.getGetterSelectorInComplexSendSet(node); | |
| 267 return new PrefixStructure( | |
| 268 semantics, | |
| 269 incDecOperator, | |
| 270 getterSelector, | |
| 271 selector); | |
| 272 case SendStructureKind.POSTFIX: | |
| 273 Selector getterSelector = | |
| 274 elements.getGetterSelectorInComplexSendSet(node); | |
| 275 return new PostfixStructure( | |
| 276 semantics, | |
| 277 incDecOperator, | |
| 278 getterSelector, | |
| 279 selector); | |
| 280 } | |
| 281 } | |
| 282 | |
| 283 AccessSemantics computeAccessSemantics(Send node, | |
| 284 {bool isGetOrSet: false, | |
| 285 bool isCompound: false}) { | |
| 286 Element element = elements[node]; | |
| 287 Element getter = isCompound ? elements[node.selector] : null; | |
| 288 if (elements.isTypeLiteral(node)) { | |
| 289 DartType dartType = elements.getTypeLiteralType(node); | |
| 290 switch (dartType.kind) { | |
| 291 case TypeKind.INTERFACE: | |
| 292 return new AccessSemantics.classTypeLiteral(dartType.element); | |
| 293 case TypeKind.TYPEDEF: | |
| 294 return new AccessSemantics.typedefTypeLiteral(dartType.element); | |
| 295 case TypeKind.TYPE_VARIABLE: | |
| 296 return new AccessSemantics.typeParameterTypeLiteral(dartType.element); | |
| 297 case TypeKind.DYNAMIC: | |
| 298 return new AccessSemantics.dynamicTypeLiteral(); | |
| 299 default: | |
| 300 return internalError(node, "Unexpected type literal type: $dartType"); | |
| 301 } | |
| 302 } else if (node.isSuperCall) { | |
| 303 if (!Elements.isUnresolved(element)) { | |
| 304 if (element.isField) { | |
| 305 if (getter != null && getter != element) { | |
| 306 CompoundAccessKind accessKind; | |
| 307 if (getter.isField) { | |
| 308 accessKind = CompoundAccessKind.SUPER_FIELD_FIELD; | |
| 309 } else if (getter.isGetter) { | |
| 310 accessKind = CompoundAccessKind.SUPER_GETTER_FIELD; | |
| 311 } else { | |
| 312 return internalError(node, | |
| 313 "Unsupported super call: $node : $element/$getter."); | |
| 314 } | |
| 315 return new CompoundAccessSemantics(accessKind, getter, element); | |
| 316 } | |
| 317 return new AccessSemantics.superField(element); | |
| 318 } else if (element.isGetter) { | |
| 319 return new AccessSemantics.superGetter(element); | |
| 320 } else if (element.isSetter) { | |
| 321 if (getter != null) { | |
| 322 CompoundAccessKind accessKind; | |
| 323 if (getter.isField) { | |
| 324 accessKind = CompoundAccessKind.SUPER_FIELD_SETTER; | |
| 325 } else if (getter.isGetter) { | |
| 326 accessKind = CompoundAccessKind.SUPER_GETTER_SETTER; | |
| 327 } else { | |
| 328 accessKind = CompoundAccessKind.SUPER_METHOD_SETTER; | |
| 329 } | |
| 330 return new CompoundAccessSemantics(accessKind, getter, element); | |
| 331 } | |
| 332 return new AccessSemantics.superSetter(element); | |
| 333 } else { | |
| 334 return new AccessSemantics.superMethod(element); | |
| 335 } | |
| 336 } else { | |
| 337 return internalError(node, "Unsupported super call: $node : $element."); | |
| 338 } | |
| 339 } else if (node.isOperator) { | |
| 340 return new AccessSemantics.dynamicProperty(node.receiver); | |
| 341 } else if (isGetOrSet) { | |
| 342 if (!Elements.isUnresolved(element) && element.impliesType) { | |
| 343 // Prefix of a static access. | |
| 344 return null; | |
| 345 } else if (element == null) { | |
| 346 if (node.receiver == null || node.receiver.isThis()) { | |
| 347 return new AccessSemantics.thisProperty(); | |
| 348 } else { | |
| 349 return new AccessSemantics.dynamicProperty(node.receiver); | |
| 350 } | |
| 351 } else { | |
| 352 return handleStaticallyResolvedAccess(node, element, getter); | |
| 353 } | |
| 354 } else if (element != null && Initializers.isConstructorRedirect(node)) { | |
| 355 return handleStaticallyResolvedAccess(node, element, getter); | |
| 356 } else if (Elements.isClosureSend(node, element)) { | |
| 357 if (element == null) { | |
| 358 if (node.selector.isThis()) { | |
| 359 return new AccessSemantics.thisAccess(); | |
| 360 } else { | |
| 361 return new AccessSemantics.expression(); | |
| 362 } | |
| 363 } else if (!Elements.isUnresolved(element)) { | |
| 364 return handleStaticallyResolvedAccess(node, element, getter); | |
| 365 } | |
| 366 // TODO(johnniwinther): Handle this. | |
| 367 return internalError(node, "Erroneous closure send unsupported."); | |
| 368 } else { | |
| 369 if (Elements.isUnresolved(element)) { | |
| 370 if (element == null) { | |
| 371 if (node.receiver == null || node.receiver.isThis()) { | |
| 372 // Example: f() with 'f' unbound. | |
| 373 // This can only happen inside an instance method. | |
| 374 return new AccessSemantics.thisProperty(); | |
| 375 } else { | |
| 376 return new AccessSemantics.dynamicProperty(node.receiver); | |
| 377 } | |
| 378 } else { | |
| 379 // TODO(johnniwinther): Handle this. | |
| 380 return internalError(node, | |
| 381 "Statically unresolved access unsupported."); | |
| 382 } | |
| 383 } else if (element.isInstanceMember) { | |
| 384 // Example: f() with 'f' bound to instance method. | |
| 385 if (node.receiver == null || node.receiver.isThis()) { | |
| 386 return new AccessSemantics.thisProperty(); | |
| 387 } else { | |
| 388 return new AccessSemantics.dynamicProperty(node.receiver); | |
| 389 } | |
| 390 } else if (!element.isInstanceMember) { | |
| 391 // Example: A.f() or f() with 'f' bound to a static function. | |
| 392 // Also includes new A() or new A.named() which is treated like a | |
| 393 // static call to a factory. | |
| 394 return handleStaticallyResolvedAccess(node, element, getter); | |
| 395 } else { | |
| 396 internalError(node, "Cannot generate code for send"); | |
| 397 return null; | |
| 398 } | |
| 399 } | |
| 400 } | |
| 401 } | |
| 402 | |
| 403 abstract class SemanticVisitor<R, A> extends Visitor<R> | |
| 404 with SendResolverMixin { | |
| 405 TreeElements elements; | |
| 406 | |
| 407 SemanticVisitor(this.elements); | |
| 408 | |
| 409 SemanticSendVisitor<R, A> sendVisitor; | |
| 410 | |
| 411 @override | |
| 412 R visitIdentifier(Identifier node) { | |
| 413 // TODO(johnniwinther): Support argument. | |
| 414 A arg = null; | |
| 415 if (node.isThis()) { | |
| 416 // TODO(johnniwinther): Parse `this` as a [Send] whose selector is `this` | |
| 417 // to normalize with `this(...)`. | |
| 418 return sendVisitor.visitThisGet(node, arg); | |
| 419 } | |
| 420 //internalError(node, "Unhandled identifier: $node"); | |
| 421 return null; | |
| 422 } | |
| 423 | |
| 424 @override | |
| 425 R visitSend(Send node) { | |
| 426 // TODO(johnniwinther): Support argument. | |
| 427 A arg = null; | |
| 428 | |
| 429 SendStructure structure = computeSendStructure(node); | |
| 430 if (structure == null) { | |
| 431 return internalError(node, 'No structure for $node'); | |
| 432 } else { | |
| 433 return structure.dispatch(sendVisitor, node, arg); | |
| 434 } | |
| 435 } | |
| 436 | |
| 437 @override | |
| 438 R visitSendSet(SendSet node) { | |
| 439 return visitSend(node); | |
| 440 } | |
| 441 } | |
| 442 | |
| 443 abstract class SemanticSendVisitor<R, A> { | |
| 444 R apply(Node node, A arg); | |
| 445 | |
| 446 /// Read of the [parameter]. | |
| 447 /// | |
| 448 /// For instance: | |
| 449 /// m(parameter) => parameter; | |
| 450 /// | |
| 451 R visitParameterGet( | |
| 452 Send node, | |
| 453 ParameterElement parameter, | |
| 454 A arg); | |
| 455 | |
| 456 /// Assignment of [rhs] to the [parameter]. | |
| 457 /// | |
| 458 /// For instance: | |
| 459 /// m(parameter) { | |
| 460 /// parameter = rhs; | |
| 461 /// } | |
| 462 /// | |
| 463 R visitParameterSet( | |
| 464 SendSet node, | |
| 465 ParameterElement parameter, | |
| 466 Node rhs, | |
| 467 A arg); | |
| 468 | |
| 469 /// Assignment of [rhs] to the final [parameter]. | |
| 470 /// | |
| 471 /// For instance: | |
| 472 /// m(final parameter) { | |
| 473 /// parameter = rhs; | |
| 474 /// } | |
| 475 /// | |
| 476 R errorFinalParameterSet( | |
| 477 SendSet node, | |
| 478 ParameterElement parameter, | |
| 479 Node rhs, | |
| 480 A arg); | |
| 481 | |
| 482 /// Invocation of the [parameter] with [arguments]. | |
| 483 /// | |
| 484 /// For instance: | |
| 485 /// m(parameter) { | |
| 486 /// parameter(null, 42); | |
| 487 /// } | |
| 488 /// | |
| 489 R visitParameterInvoke( | |
| 490 Send node, | |
| 491 ParameterElement parameter, | |
| 492 NodeList arguments, | |
| 493 Selector selector, | |
| 494 A arg); | |
| 495 | |
| 496 /// Read of the local [variable]. | |
| 497 /// | |
| 498 /// For instance: | |
| 499 /// m() { | |
| 500 /// var variable; | |
| 501 /// return variable; | |
| 502 /// } | |
| 503 /// | |
| 504 R visitLocalVariableGet( | |
| 505 Send node, | |
| 506 LocalVariableElement variable, | |
| 507 A arg); | |
| 508 | |
| 509 /// Assignment of [rhs] to the local [variable]. | |
| 510 /// | |
| 511 /// For instance: | |
| 512 /// m() { | |
| 513 /// var variable; | |
| 514 /// variable = rhs; | |
| 515 /// } | |
| 516 /// | |
| 517 R visitLocalVariableSet( | |
| 518 SendSet node, | |
| 519 LocalVariableElement variable, | |
| 520 Node rhs, | |
| 521 A arg); | |
| 522 | |
| 523 /// Assignment of [rhs] to the final local [variable]. | |
| 524 /// | |
| 525 /// For instance: | |
| 526 /// m() { | |
| 527 /// final variable = null; | |
| 528 /// variable = rhs; | |
| 529 /// } | |
| 530 /// | |
| 531 R errorFinalLocalVariableSet( | |
| 532 SendSet node, | |
| 533 LocalVariableElement variable, | |
| 534 Node rhs, | |
| 535 A arg); | |
| 536 | |
| 537 /// Invocation of the local variable [variable] with [arguments]. | |
| 538 /// | |
| 539 /// For instance: | |
| 540 /// m() { | |
| 541 /// var variable; | |
| 542 /// variable(null, 42); | |
| 543 /// } | |
| 544 /// | |
| 545 R visitLocalVariableInvoke( | |
| 546 Send node, | |
| 547 LocalVariableElement variable, | |
| 548 NodeList arguments, | |
| 549 Selector selector, | |
| 550 A arg); | |
| 551 | |
| 552 /// Closurization of the local [function]. | |
| 553 /// | |
| 554 /// For instance: | |
| 555 /// m() { | |
| 556 /// o(a, b) {} | |
| 557 /// return o; | |
| 558 /// } | |
| 559 /// | |
| 560 R visitLocalFunctionGet( | |
| 561 Send node, | |
| 562 LocalFunctionElement function, | |
| 563 A arg); | |
| 564 | |
| 565 /// Assignment of [rhs] to the local [function]. | |
| 566 /// | |
| 567 /// For instance: | |
| 568 /// m() { | |
| 569 /// o(a, b) {} | |
| 570 /// o = rhs; | |
| 571 /// } | |
| 572 /// | |
| 573 R errorLocalFunctionSet( | |
| 574 SendSet node, | |
| 575 LocalFunctionElement function, | |
| 576 Node rhs, | |
| 577 A arg); | |
| 578 | |
| 579 /// Invocation of the local [function] with [arguments]. | |
| 580 /// | |
| 581 /// For instance: | |
| 582 /// m() { | |
| 583 /// o(a, b) {} | |
| 584 /// return o(null, 42); | |
| 585 /// } | |
| 586 /// | |
| 587 R visitLocalFunctionInvoke( | |
| 588 Send node, | |
| 589 LocalFunctionElement function, | |
| 590 NodeList arguments, | |
| 591 Selector selector, | |
| 592 A arg); | |
| 593 | |
| 594 /// Getter call on [receiver] of the property defined by [selector]. | |
| 595 /// | |
| 596 /// For instance | |
| 597 /// m(receiver) => receiver.foo; | |
| 598 /// | |
| 599 R visitDynamicPropertyGet( | |
| 600 Send node, | |
| 601 Node receiver, | |
| 602 Selector selector, | |
| 603 A arg); | |
| 604 | |
| 605 /// Setter call on [receiver] with argument [rhs] of the property defined by | |
| 606 /// [selector]. | |
| 607 /// | |
| 608 /// For instance | |
| 609 /// m(receiver) { | |
| 610 /// receiver.foo = rhs; | |
| 611 /// } | |
| 612 /// | |
| 613 R visitDynamicPropertySet( | |
| 614 SendSet node, | |
| 615 Node receiver, | |
| 616 Selector selector, | |
| 617 Node rhs, | |
| 618 A arg); | |
| 619 | |
| 620 /// Invocation of the property defined by [selector] on [receiver] with | |
| 621 /// [arguments]. | |
| 622 /// | |
| 623 /// For instance | |
| 624 /// m(receiver) { | |
| 625 /// receiver.foo(null, 42); | |
| 626 /// } | |
| 627 /// | |
| 628 R visitDynamicPropertyInvoke( | |
| 629 Send node, | |
| 630 Node receiver, | |
| 631 NodeList arguments, | |
| 632 Selector selector, | |
| 633 A arg); | |
| 634 | |
| 635 /// Getter call on `this` of the property defined by [selector]. | |
| 636 /// | |
| 637 /// For instance | |
| 638 /// class C { | |
| 639 /// m() => this.foo; | |
| 640 /// } | |
| 641 /// | |
| 642 /// or | |
| 643 /// | |
| 644 /// class C { | |
| 645 /// m() => foo; | |
| 646 /// } | |
| 647 /// | |
| 648 R visitThisPropertyGet( | |
| 649 Send node, | |
| 650 Selector selector, | |
| 651 A arg); | |
| 652 | |
| 653 /// Setter call on `this` with argument [rhs] of the property defined by | |
| 654 /// [selector]. | |
| 655 /// class C { | |
| 656 /// m() { this.foo = rhs; } | |
| 657 /// } | |
| 658 /// | |
| 659 /// or | |
| 660 /// | |
| 661 /// class C { | |
| 662 /// m() { foo = rhs; } | |
| 663 /// } | |
| 664 /// | |
| 665 R visitThisPropertySet( | |
| 666 SendSet node, | |
| 667 Selector selector, | |
| 668 Node rhs, | |
| 669 A arg); | |
| 670 | |
| 671 /// Invocation of the property defined by [selector] on `this` with | |
| 672 /// [arguments]. | |
| 673 /// | |
| 674 /// For instance | |
| 675 /// class C { | |
| 676 /// m() { this.foo(null, 42); } | |
| 677 /// } | |
| 678 /// | |
| 679 /// or | |
| 680 /// | |
| 681 /// class C { | |
| 682 /// m() { foo(null, 42); } | |
| 683 /// } | |
| 684 /// | |
| 685 /// | |
| 686 R visitThisPropertyInvoke( | |
| 687 Send node, | |
| 688 NodeList arguments, | |
| 689 Selector selector, | |
| 690 A arg); | |
| 691 | |
| 692 /// Read of `this`. | |
| 693 /// | |
| 694 /// For instance | |
| 695 /// class C { | |
| 696 /// m() => this; | |
| 697 /// } | |
| 698 /// | |
| 699 R visitThisGet( | |
| 700 Identifier node, | |
| 701 A arg); | |
| 702 | |
| 703 /// Invocation of `this` with [arguments]. | |
| 704 /// | |
| 705 /// For instance | |
| 706 /// class C { | |
| 707 /// m() => this(null, 42); | |
| 708 /// } | |
| 709 /// | |
| 710 R visitThisInvoke( | |
| 711 Send node, | |
| 712 NodeList arguments, | |
| 713 Selector selector, | |
| 714 A arg); | |
| 715 | |
| 716 | |
| 717 /// Read of the super [field]. | |
| 718 /// | |
| 719 /// For instance | |
| 720 /// class B { | |
| 721 /// var foo; | |
| 722 /// } | |
| 723 /// class C extends B { | |
| 724 /// m() => super.foo; | |
| 725 /// } | |
| 726 /// | |
| 727 R visitSuperFieldGet( | |
| 728 Send node, | |
| 729 FieldElement field, | |
| 730 A arg); | |
| 731 | |
| 732 /// Assignment of [rhs] to the super [field]. | |
| 733 /// | |
| 734 /// For instance | |
| 735 /// class B { | |
| 736 /// var foo; | |
| 737 /// } | |
| 738 /// class C extends B { | |
| 739 /// m() { super.foo = rhs; } | |
| 740 /// } | |
| 741 /// | |
| 742 R visitSuperFieldSet( | |
| 743 SendSet node, | |
| 744 FieldElement field, | |
| 745 Node rhs, | |
| 746 A arg); | |
| 747 | |
| 748 /// Assignment of [rhs] to the final static [field]. | |
| 749 /// | |
| 750 /// For instance | |
| 751 /// class B { | |
| 752 /// final foo = null; | |
| 753 /// } | |
| 754 /// class C extends B { | |
| 755 /// m() { super.foo = rhs; } | |
| 756 /// } | |
| 757 /// | |
| 758 R errorFinalSuperFieldSet( | |
| 759 SendSet node, | |
| 760 FieldElement field, | |
| 761 Node rhs, | |
| 762 A arg); | |
| 763 | |
| 764 /// Invocation of the super [field] with [arguments]. | |
| 765 /// | |
| 766 /// For instance | |
| 767 /// class B { | |
| 768 /// var foo; | |
| 769 /// } | |
| 770 /// class C extends B { | |
| 771 /// m() { super.foo(null, 42); } | |
| 772 /// } | |
| 773 /// | |
| 774 R visitSuperFieldInvoke( | |
| 775 Send node, | |
| 776 FieldElement field, | |
| 777 NodeList arguments, | |
| 778 Selector selector, | |
| 779 A arg); | |
| 780 | |
| 781 /// Closurization of the super [method]. | |
| 782 /// | |
| 783 /// For instance | |
| 784 /// class B { | |
| 785 /// foo(a, b) {} | |
| 786 /// } | |
| 787 /// class C extends B { | |
| 788 /// m() => super.foo; | |
| 789 /// } | |
| 790 /// | |
| 791 R visitSuperMethodGet( | |
| 792 Send node, | |
| 793 MethodElement method, | |
| 794 A arg); | |
| 795 | |
| 796 /// Invocation of the super [method] with [arguments]. | |
| 797 /// | |
| 798 /// For instance | |
| 799 /// class B { | |
| 800 /// foo(a, b) {} | |
| 801 /// } | |
| 802 /// class C extends B { | |
| 803 /// m() { super.foo(null, 42); } | |
| 804 /// } | |
| 805 /// | |
| 806 R visitSuperMethodInvoke( | |
| 807 Send node, | |
| 808 MethodElement method, | |
| 809 NodeList arguments, | |
| 810 Selector selector, | |
| 811 A arg); | |
| 812 | |
| 813 /// Assignment of [rhs] to the super [method]. | |
| 814 /// | |
| 815 /// For instance | |
| 816 /// class B { | |
| 817 /// foo(a, b) {} | |
| 818 /// } | |
| 819 /// class C extends B { | |
| 820 /// m() { super.foo = rhs; } | |
| 821 /// } | |
| 822 /// | |
| 823 R errorSuperMethodSet( | |
| 824 Send node, | |
| 825 MethodElement method, | |
| 826 Node rhs, | |
| 827 A arg); | |
| 828 | |
| 829 /// Getter call to the super [getter]. | |
| 830 /// | |
| 831 /// For instance | |
| 832 /// class B { | |
| 833 /// get foo => null; | |
| 834 /// } | |
| 835 /// class C extends B { | |
| 836 /// m() => super.foo; | |
| 837 /// } | |
| 838 /// | |
| 839 R visitSuperGetterGet( | |
| 840 Send node, | |
| 841 FunctionElement getter, | |
| 842 A arg); | |
| 843 | |
| 844 /// Getter call the super [setter]. | |
| 845 /// | |
| 846 /// For instance | |
| 847 /// class B { | |
| 848 /// set foo(_) {} | |
| 849 /// } | |
| 850 /// class C extends B { | |
| 851 /// m() => super.foo; | |
| 852 /// } | |
| 853 /// | |
| 854 R errorSuperSetterGet( | |
| 855 Send node, | |
| 856 FunctionElement setter, | |
| 857 A arg); | |
| 858 | |
| 859 /// Setter call to the super [setter]. | |
| 860 /// | |
| 861 /// For instance | |
| 862 /// class B { | |
| 863 /// set foo(_) {} | |
| 864 /// } | |
| 865 /// class C extends B { | |
| 866 /// m() { super.foo = rhs; } | |
| 867 /// } | |
| 868 /// | |
| 869 R visitSuperSetterSet( | |
| 870 SendSet node, | |
| 871 FunctionElement setter, | |
| 872 Node rhs, | |
| 873 A arg); | |
| 874 | |
| 875 /// Assignment of [rhs] to the super [getter]. | |
| 876 /// | |
| 877 /// For instance | |
| 878 /// class B { | |
| 879 /// get foo => null; | |
| 880 /// } | |
| 881 /// class C extends B { | |
| 882 /// m() { super.foo = rhs; } | |
| 883 /// } | |
| 884 /// | |
| 885 R errorSuperGetterSet( | |
| 886 SendSet node, | |
| 887 FunctionElement getter, | |
| 888 Node rhs, | |
| 889 A arg); | |
| 890 | |
| 891 /// Invocation of the super [getter] with [arguments]. | |
| 892 /// | |
| 893 /// For instance | |
| 894 /// class B { | |
| 895 /// get foo => null; | |
| 896 /// } | |
| 897 /// class C extends B { | |
| 898 /// m() { super.foo(null, 42; } | |
| 899 /// } | |
| 900 /// | |
| 901 R visitSuperGetterInvoke( | |
| 902 Send node, | |
| 903 FunctionElement getter, | |
| 904 NodeList arguments, | |
| 905 Selector selector, | |
| 906 A arg); | |
| 907 | |
| 908 /// Invocation of the super [setter] with [arguments]. | |
| 909 /// | |
| 910 /// For instance | |
| 911 /// class B { | |
| 912 /// set foo(_) {} | |
| 913 /// } | |
| 914 /// class C extends B { | |
| 915 /// m() { super.foo(null, 42; } | |
| 916 /// } | |
| 917 /// | |
| 918 R errorSuperSetterInvoke( | |
| 919 Send node, | |
| 920 FunctionElement setter, | |
| 921 NodeList arguments, | |
| 922 Selector selector, | |
| 923 A arg); | |
| 924 | |
| 925 /// Invocation of a [expression] with [arguments]. | |
| 926 /// | |
| 927 /// For instance | |
| 928 /// m() => (a, b){}(null, 42); | |
| 929 /// | |
| 930 R visitExpressionInvoke( | |
| 931 Send node, | |
| 932 Node expression, | |
| 933 NodeList arguments, | |
| 934 Selector selector, | |
| 935 A arg); | |
| 936 | |
| 937 /// Read of the static [field]. | |
| 938 /// | |
| 939 /// For instance | |
| 940 /// class C { | |
| 941 /// static var foo; | |
| 942 /// } | |
| 943 /// m() => C.foo; | |
| 944 /// | |
| 945 R visitStaticFieldGet( | |
| 946 Send node, | |
| 947 FieldElement field, | |
| 948 A arg); | |
| 949 | |
| 950 /// Assignment of [rhs] to the static [field]. | |
| 951 /// | |
| 952 /// For instance | |
| 953 /// class C { | |
| 954 /// static var foo; | |
| 955 /// } | |
| 956 /// m() { C.foo = rhs; } | |
| 957 /// | |
| 958 R visitStaticFieldSet( | |
| 959 SendSet node, | |
| 960 FieldElement field, | |
| 961 Node rhs, | |
| 962 A arg); | |
| 963 | |
| 964 /// Assignment of [rhs] to the final static [field]. | |
| 965 /// | |
| 966 /// For instance | |
| 967 /// class C { | |
| 968 /// static final foo; | |
| 969 /// } | |
| 970 /// m() { C.foo = rhs; } | |
| 971 /// | |
| 972 R errorFinalStaticFieldSet( | |
| 973 SendSet node, | |
| 974 FieldElement field, | |
| 975 Node rhs, | |
| 976 A arg); | |
| 977 | |
| 978 /// Invocation of the static [field] with [arguments]. | |
| 979 /// | |
| 980 /// For instance | |
| 981 /// class C { | |
| 982 /// static var foo; | |
| 983 /// } | |
| 984 /// m() { C.foo(null, 42); } | |
| 985 /// | |
| 986 R visitStaticFieldInvoke( | |
| 987 Send node, | |
| 988 FieldElement field, | |
| 989 NodeList arguments, | |
| 990 Selector selector, | |
| 991 A arg); | |
| 992 | |
| 993 /// Closurization of the static [function]. | |
| 994 /// | |
| 995 /// For instance | |
| 996 /// class C { | |
| 997 /// static foo(a, b) {} | |
| 998 /// } | |
| 999 /// m() => C.foo; | |
| 1000 /// | |
| 1001 R visitStaticFunctionGet( | |
| 1002 Send node, | |
| 1003 MethodElement function, | |
| 1004 A arg); | |
| 1005 | |
| 1006 /// Invocation of the static [function] with [arguments]. | |
| 1007 /// | |
| 1008 /// For instance | |
| 1009 /// class C { | |
| 1010 /// static foo(a, b) {} | |
| 1011 /// } | |
| 1012 /// m() { C.foo(null, 42); } | |
| 1013 /// | |
| 1014 R visitStaticFunctionInvoke( | |
| 1015 Send node, | |
| 1016 MethodElement function, | |
| 1017 NodeList arguments, | |
| 1018 Selector selector, | |
| 1019 A arg); | |
| 1020 | |
| 1021 /// Assignment of [rhs] to the static [function]. | |
| 1022 /// | |
| 1023 /// For instance | |
| 1024 /// class C { | |
| 1025 /// static foo(a, b) {} | |
| 1026 /// } | |
| 1027 /// m() { C.foo = rhs; } | |
| 1028 /// | |
| 1029 R errorStaticFunctionSet( | |
| 1030 Send node, | |
| 1031 MethodElement function, | |
| 1032 Node rhs, | |
| 1033 A arg); | |
| 1034 | |
| 1035 /// Getter call to the static [getter]. | |
| 1036 /// | |
| 1037 /// For instance | |
| 1038 /// class C { | |
| 1039 /// static get foo => null; | |
| 1040 /// } | |
| 1041 /// m() => C.foo; | |
| 1042 /// | |
| 1043 R visitStaticGetterGet( | |
| 1044 Send node, | |
| 1045 FunctionElement getter, | |
| 1046 A arg); | |
| 1047 | |
| 1048 /// Getter call the static [setter]. | |
| 1049 /// | |
| 1050 /// For instance | |
| 1051 /// class C { | |
| 1052 /// static set foo(_) {} | |
| 1053 /// } | |
| 1054 /// m() => C.foo; | |
| 1055 /// | |
| 1056 R errorStaticSetterGet( | |
| 1057 Send node, | |
| 1058 FunctionElement setter, | |
| 1059 A arg); | |
| 1060 | |
| 1061 /// Setter call to the static [setter]. | |
| 1062 /// | |
| 1063 /// For instance | |
| 1064 /// class C { | |
| 1065 /// static set foo(_) {} | |
| 1066 /// } | |
| 1067 /// m() { C.foo = rhs; } | |
| 1068 /// | |
| 1069 R visitStaticSetterSet( | |
| 1070 SendSet node, | |
| 1071 FunctionElement setter, | |
| 1072 Node rhs, | |
| 1073 A arg); | |
| 1074 | |
| 1075 /// Assignment of [rhs] to the static [getter]. | |
| 1076 /// | |
| 1077 /// For instance | |
| 1078 /// class C { | |
| 1079 /// static get foo => null; | |
| 1080 /// } | |
| 1081 /// m() { C.foo = rhs; } | |
| 1082 /// | |
| 1083 R errorStaticGetterSet( | |
| 1084 SendSet node, | |
| 1085 FunctionElement getter, | |
| 1086 Node rhs, | |
| 1087 A arg); | |
| 1088 | |
| 1089 /// Invocation of the static [getter] with [arguments]. | |
| 1090 /// | |
| 1091 /// For instance | |
| 1092 /// class C { | |
| 1093 /// static get foo => null; | |
| 1094 /// } | |
| 1095 /// m() { C.foo(null, 42; } | |
| 1096 /// | |
| 1097 R visitStaticGetterInvoke( | |
| 1098 Send node, | |
| 1099 FunctionElement getter, | |
| 1100 NodeList arguments, | |
| 1101 Selector selector, | |
| 1102 A arg); | |
| 1103 | |
| 1104 /// Invocation of the static [setter] with [arguments]. | |
| 1105 /// | |
| 1106 /// For instance | |
| 1107 /// class C { | |
| 1108 /// static set foo(_) {} | |
| 1109 /// } | |
| 1110 /// m() { C.foo(null, 42; } | |
| 1111 /// | |
| 1112 R errorStaticSetterInvoke( | |
| 1113 Send node, | |
| 1114 FunctionElement setter, | |
| 1115 NodeList arguments, | |
| 1116 Selector selector, | |
| 1117 A arg); | |
| 1118 | |
| 1119 /// Read of the top level [field]. | |
| 1120 /// | |
| 1121 /// For instance | |
| 1122 /// var foo; | |
| 1123 /// m() => foo; | |
| 1124 /// | |
| 1125 R visitTopLevelFieldGet( | |
| 1126 Send node, | |
| 1127 FieldElement field, | |
| 1128 A arg); | |
| 1129 | |
| 1130 /// Assignment of [rhs] to the top level [field]. | |
| 1131 /// | |
| 1132 /// For instance | |
| 1133 /// var foo; | |
| 1134 /// m() { foo = rhs; } | |
| 1135 /// | |
| 1136 R visitTopLevelFieldSet( | |
| 1137 SendSet node, | |
| 1138 FieldElement field, | |
| 1139 Node rhs, | |
| 1140 A arg); | |
| 1141 | |
| 1142 /// Assignment of [rhs] to the final top level [field]. | |
| 1143 /// | |
| 1144 /// For instance | |
| 1145 /// final foo = null; | |
| 1146 /// m() { foo = rhs; } | |
| 1147 /// | |
| 1148 R errorFinalTopLevelFieldSet( | |
| 1149 SendSet node, | |
| 1150 FieldElement field, | |
| 1151 Node rhs, | |
| 1152 A arg); | |
| 1153 | |
| 1154 /// Invocation of the top level [field] with [arguments]. | |
| 1155 /// | |
| 1156 /// For instance | |
| 1157 /// var foo; | |
| 1158 /// m() { foo(null, 42); } | |
| 1159 /// | |
| 1160 R visitTopLevelFieldInvoke( | |
| 1161 Send node, | |
| 1162 FieldElement field, | |
| 1163 NodeList arguments, | |
| 1164 Selector selector, | |
| 1165 A arg); | |
| 1166 | |
| 1167 /// Closurization of the top level [function]. | |
| 1168 /// | |
| 1169 /// For instance | |
| 1170 /// foo(a, b) {}; | |
| 1171 /// m() => foo; | |
| 1172 /// | |
| 1173 R visitTopLevelFunctionGet( | |
| 1174 Send node, | |
| 1175 MethodElement function, | |
| 1176 A arg); | |
| 1177 | |
| 1178 /// Invocation of the top level [function] with [arguments]. | |
| 1179 /// | |
| 1180 /// For instance | |
| 1181 /// foo(a, b) {}; | |
| 1182 /// m() { foo(null, 42); } | |
| 1183 /// | |
| 1184 R visitTopLevelFunctionInvoke( | |
| 1185 Send node, | |
| 1186 MethodElement function, | |
| 1187 NodeList arguments, | |
| 1188 Selector selector, | |
| 1189 A arg); | |
| 1190 | |
| 1191 /// Assignment of [rhs] to the top level [function]. | |
| 1192 /// | |
| 1193 /// For instance | |
| 1194 /// foo(a, b) {}; | |
| 1195 /// m() { foo = rhs; } | |
| 1196 /// | |
| 1197 R errorTopLevelFunctionSet( | |
| 1198 Send node, | |
| 1199 MethodElement function, | |
| 1200 Node rhs, | |
| 1201 A arg); | |
| 1202 | |
| 1203 /// Getter call to the top level [getter]. | |
| 1204 /// | |
| 1205 /// For instance | |
| 1206 /// get foo => null; | |
| 1207 /// m() => foo; | |
| 1208 /// | |
| 1209 R visitTopLevelGetterGet( | |
| 1210 Send node, | |
| 1211 FunctionElement getter, | |
| 1212 A arg); | |
| 1213 | |
| 1214 /// Getter call the top level [setter]. | |
| 1215 /// | |
| 1216 /// For instance | |
| 1217 /// set foo(_) {} | |
| 1218 /// m() => foo; | |
| 1219 /// | |
| 1220 R errorTopLevelSetterGet( | |
| 1221 Send node, | |
| 1222 FunctionElement setter, | |
| 1223 A arg); | |
| 1224 | |
| 1225 /// Setter call to the top level [setter]. | |
| 1226 /// | |
| 1227 /// For instance | |
| 1228 /// set foo(_) {} | |
| 1229 /// m() { foo = rhs; } | |
| 1230 /// | |
| 1231 R visitTopLevelSetterSet( | |
| 1232 SendSet node, | |
| 1233 FunctionElement setter, | |
| 1234 Node rhs, | |
| 1235 A arg); | |
| 1236 | |
| 1237 /// Assignment of [rhs] to the top level [getter]. | |
| 1238 /// | |
| 1239 /// For instance | |
| 1240 /// get foo => null; | |
| 1241 /// m() { foo = rhs; } | |
| 1242 /// | |
| 1243 R errorTopLevelGetterSet( | |
| 1244 SendSet node, | |
| 1245 FunctionElement getter, | |
| 1246 Node rhs, | |
| 1247 A arg); | |
| 1248 | |
| 1249 /// Invocation of the top level [getter] with [arguments]. | |
| 1250 /// | |
| 1251 /// For instance | |
| 1252 /// get foo => null; | |
| 1253 /// m() { foo(null, 42); } | |
| 1254 /// | |
| 1255 R visitTopLevelGetterInvoke( | |
| 1256 Send node, | |
| 1257 FunctionElement getter, | |
| 1258 NodeList arguments, | |
| 1259 Selector selector, | |
| 1260 A arg); | |
| 1261 | |
| 1262 /// Invocation of the top level [setter] with [arguments]. | |
| 1263 /// | |
| 1264 /// For instance | |
| 1265 /// set foo(_) {}; | |
| 1266 /// m() { foo(null, 42); } | |
| 1267 /// | |
| 1268 R errorTopLevelSetterInvoke( | |
| 1269 Send node, | |
| 1270 FunctionElement setter, | |
| 1271 NodeList arguments, | |
| 1272 Selector selector, | |
| 1273 A arg); | |
| 1274 | |
| 1275 /// Read of the type literal for class [element]. | |
| 1276 /// | |
| 1277 /// For instance | |
| 1278 /// class C {} | |
| 1279 /// m() => C; | |
| 1280 /// | |
| 1281 R visitClassTypeLiteralGet( | |
| 1282 Send node, | |
| 1283 ClassElement element, | |
| 1284 A arg); | |
| 1285 | |
| 1286 /// Invocation of the type literal for class [element] with [arguments]. | |
| 1287 /// | |
| 1288 /// For instance | |
| 1289 /// class C {} | |
| 1290 /// m() => C(null, 42); | |
| 1291 /// | |
| 1292 R visitClassTypeLiteralInvoke( | |
| 1293 Send node, | |
| 1294 ClassElement element, | |
| 1295 NodeList arguments, | |
| 1296 Selector selector, | |
| 1297 A arg); | |
| 1298 | |
| 1299 /// Assignment of [rhs] to the type literal for class [element]. | |
| 1300 /// | |
| 1301 /// For instance | |
| 1302 /// class C {} | |
| 1303 /// m() { C = rhs; } | |
| 1304 /// | |
| 1305 R errorClassTypeLiteralSet( | |
| 1306 SendSet node, | |
| 1307 ClassElement element, | |
| 1308 Node rhs, | |
| 1309 A arg); | |
| 1310 | |
| 1311 /// Read of the type literal for typedef [element]. | |
| 1312 /// | |
| 1313 /// For instance | |
| 1314 /// typedef F(); | |
| 1315 /// m() => F; | |
| 1316 /// | |
| 1317 R visitTypedefTypeLiteralGet( | |
| 1318 Send node, | |
| 1319 TypedefElement element, | |
| 1320 A arg); | |
| 1321 | |
| 1322 /// Invocation of the type literal for typedef [element] with [arguments]. | |
| 1323 /// | |
| 1324 /// For instance | |
| 1325 /// typedef F(); | |
| 1326 /// m() => F(null, 42); | |
| 1327 /// | |
| 1328 R visitTypedefTypeLiteralInvoke( | |
| 1329 Send node, | |
| 1330 TypedefElement element, | |
| 1331 NodeList arguments, | |
| 1332 Selector selector, | |
| 1333 A arg); | |
| 1334 | |
| 1335 /// Assignment of [rhs] to the type literal for typedef [element]. | |
| 1336 /// | |
| 1337 /// For instance | |
| 1338 /// typedef F(); | |
| 1339 /// m() { F = rhs; } | |
| 1340 /// | |
| 1341 R errorTypedefTypeLiteralSet( | |
| 1342 SendSet node, | |
| 1343 TypedefElement element, | |
| 1344 Node rhs, | |
| 1345 A arg); | |
| 1346 | |
| 1347 /// Read of the type literal for type variable [element]. | |
| 1348 /// | |
| 1349 /// For instance | |
| 1350 /// class C<T> { | |
| 1351 /// m() => T; | |
| 1352 /// } | |
| 1353 /// | |
| 1354 R visitTypeVariableTypeLiteralGet( | |
| 1355 Send node, | |
| 1356 TypeVariableElement element, | |
| 1357 A arg); | |
| 1358 | |
| 1359 /// Invocation of the type literal for type variable [element] with | |
| 1360 /// [arguments]. | |
| 1361 /// | |
| 1362 /// For instance | |
| 1363 /// class C<T> { | |
| 1364 /// m() { T(null, 42); } | |
| 1365 /// } | |
| 1366 /// | |
| 1367 R visitTypeVariableTypeLiteralInvoke( | |
| 1368 Send node, | |
| 1369 TypeVariableElement element, | |
| 1370 NodeList arguments, | |
| 1371 Selector selector, | |
| 1372 A arg); | |
| 1373 | |
| 1374 /// Assignment of [rhs] to the type literal for type variable [element]. | |
| 1375 /// | |
| 1376 /// For instance | |
| 1377 /// class C<T> { | |
| 1378 /// m() { T = rhs; } | |
| 1379 /// } | |
| 1380 /// | |
| 1381 R errorTypeVariableTypeLiteralSet( | |
| 1382 SendSet node, | |
| 1383 TypeVariableElement element, | |
| 1384 Node rhs, | |
| 1385 A arg); | |
| 1386 | |
| 1387 /// Read of the type literal for `dynamic`. | |
| 1388 /// | |
| 1389 /// For instance | |
| 1390 /// m() => dynamic; | |
| 1391 /// | |
| 1392 R visitDynamicTypeLiteralGet( | |
| 1393 Send node, | |
| 1394 A arg); | |
| 1395 | |
| 1396 /// Invocation of the type literal for `dynamic` with [arguments]. | |
| 1397 /// | |
| 1398 /// For instance | |
| 1399 /// m() { dynamic(null, 42); } | |
| 1400 /// | |
| 1401 R visitDynamicTypeLiteralInvoke( | |
| 1402 Send node, | |
| 1403 NodeList arguments, | |
| 1404 Selector selector, | |
| 1405 A arg); | |
| 1406 | |
| 1407 /// Assignment of [rhs] to the type literal for `dynamic`. | |
| 1408 /// | |
| 1409 /// For instance | |
| 1410 /// m() { dynamic = rhs; } | |
| 1411 /// | |
| 1412 R errorDynamicTypeLiteralSet( | |
| 1413 SendSet node, | |
| 1414 Node rhs, | |
| 1415 A arg); | |
| 1416 | |
| 1417 /// Call to `assert` with [expression] as the condition. | |
| 1418 /// | |
| 1419 /// For instance: | |
| 1420 /// m() { assert(expression); } | |
| 1421 /// | |
| 1422 R visitAssert( | |
| 1423 Send node, | |
| 1424 Node expression, | |
| 1425 A arg); | |
| 1426 | |
| 1427 /// Binary expression `left operator right` where [operator] is a user | |
| 1428 /// definable operator. Binary expressions using operator `==` are handled | |
| 1429 /// by [visitEquals]. | |
| 1430 /// | |
| 1431 /// For instance: | |
| 1432 /// add(a, b) => a + b; | |
| 1433 /// sub(a, b) => a - b; | |
| 1434 /// mul(a, b) => a * b; | |
| 1435 /// | |
| 1436 R visitBinary( | |
| 1437 Send node, | |
| 1438 Node left, | |
| 1439 BinaryOperator operator, | |
| 1440 Node right, | |
| 1441 A arg); | |
| 1442 | |
| 1443 /// Binary expression `super operator argument` where [operator] is a user | |
| 1444 /// definable operator implemented on a superclass by [function]. Binary | |
| 1445 /// expressions using operator `==` are handled by [visitSuperEquals]. | |
| 1446 /// | |
| 1447 /// For instance: | |
| 1448 /// class B { | |
| 1449 /// operator +(_) => null; | |
| 1450 /// } | |
| 1451 /// class C extends B { | |
| 1452 /// m(a) => super + a; | |
| 1453 /// } | |
| 1454 /// | |
| 1455 R visitSuperBinary( | |
| 1456 Send node, | |
| 1457 FunctionElement function, | |
| 1458 BinaryOperator operator, | |
| 1459 Node argument, | |
| 1460 A arg); | |
| 1461 | |
| 1462 /// Binary expression `left == right`. | |
| 1463 /// | |
| 1464 /// For instance: | |
| 1465 /// neq(a, b) => a != b; | |
| 1466 /// | |
| 1467 R visitNotEquals( | |
| 1468 Send node, | |
| 1469 Node left, | |
| 1470 Node right, | |
| 1471 A arg); | |
| 1472 | |
| 1473 /// Binary expression `super != argument` where `==` is implemented on a | |
| 1474 /// superclass by [function]. | |
| 1475 /// | |
| 1476 /// For instance: | |
| 1477 /// class B { | |
| 1478 /// operator +(_) => null; | |
| 1479 /// } | |
| 1480 /// class C extends B { | |
| 1481 /// m(a) => super + a; | |
| 1482 /// } | |
| 1483 /// | |
| 1484 R visitSuperNotEquals( | |
| 1485 Send node, | |
| 1486 FunctionElement function, | |
| 1487 Node argument, | |
| 1488 A arg); | |
| 1489 | |
| 1490 /// Binary expression `left == right`. | |
| 1491 /// | |
| 1492 /// For instance: | |
| 1493 /// eq(a, b) => a == b; | |
| 1494 /// | |
| 1495 R visitEquals( | |
| 1496 Send node, | |
| 1497 Node left, | |
| 1498 Node right, | |
| 1499 A arg); | |
| 1500 | |
| 1501 /// Binary expression `super == argument` where `==` is implemented on a | |
| 1502 /// superclass by [function]. | |
| 1503 /// | |
| 1504 /// For instance: | |
| 1505 /// class B { | |
| 1506 /// operator ==(_) => null; | |
| 1507 /// } | |
| 1508 /// class C extends B { | |
| 1509 /// m(a) => super == a; | |
| 1510 /// } | |
| 1511 /// | |
| 1512 R visitSuperEquals( | |
| 1513 Send node, | |
| 1514 FunctionElement function, | |
| 1515 Node argument, | |
| 1516 A arg); | |
| 1517 | |
| 1518 /// Unary expression `operator expression` where [operator] is a user | |
| 1519 /// definable operator. | |
| 1520 /// | |
| 1521 /// For instance: | |
| 1522 /// neg(a, b) => -a; | |
| 1523 /// comp(a, b) => ~a; | |
| 1524 /// | |
| 1525 R visitUnary( | |
| 1526 Send node, | |
| 1527 UnaryOperator operator, | |
| 1528 Node expression, | |
| 1529 A arg); | |
| 1530 | |
| 1531 /// Unary expression `operator super` where [operator] is a user definable | |
| 1532 /// operator implemented on a superclass by [function]. | |
| 1533 /// | |
| 1534 /// For instance: | |
| 1535 /// class B { | |
| 1536 /// operator -() => null; | |
| 1537 /// } | |
| 1538 /// class C extends B { | |
| 1539 /// m(a) => -super; | |
| 1540 /// } | |
| 1541 /// | |
| 1542 R visitSuperUnary( | |
| 1543 Send node, | |
| 1544 UnaryOperator operator, | |
| 1545 FunctionElement function, | |
| 1546 A arg); | |
| 1547 | |
| 1548 /// Unary expression `!expression`. | |
| 1549 /// | |
| 1550 /// For instance: | |
| 1551 /// not(a) => !a; | |
| 1552 /// | |
| 1553 R visitNot( | |
| 1554 Send node, | |
| 1555 Node expression, | |
| 1556 A arg); | |
| 1557 | |
| 1558 /// Index set expression `receiver[index] = rhs`. | |
| 1559 /// | |
| 1560 /// For instance: | |
| 1561 /// m(receiver, index, rhs) => receiver[index] = rhs; | |
| 1562 /// | |
| 1563 R visitIndexSet( | |
| 1564 Send node, | |
| 1565 Node receiver, | |
| 1566 Node index, | |
| 1567 Node rhs, | |
| 1568 A arg); | |
| 1569 | |
| 1570 /// Index set expression `super[index] = rhs` where `operator []=` is defined | |
| 1571 /// on a superclass by [function]. | |
| 1572 /// | |
| 1573 /// For instance: | |
| 1574 /// class B { | |
| 1575 /// operator []=(a, b) {} | |
| 1576 /// } | |
| 1577 /// class C extends B { | |
| 1578 /// m(a, b) => super[a] = b; | |
| 1579 /// } | |
| 1580 /// | |
| 1581 R visitSuperIndexSet( | |
| 1582 Send node, | |
| 1583 FunctionElement function, | |
| 1584 Node index, | |
| 1585 Node rhs, | |
| 1586 A arg); | |
| 1587 | |
| 1588 /// Lazy and, &&, expression with operands [left] and [right]. | |
| 1589 /// | |
| 1590 /// For instance | |
| 1591 /// m() => left && right; | |
| 1592 /// | |
| 1593 R visitLazyAnd( | |
|
karlklose
2015/02/25 12:39:39
Why not logical and?
Johnni Winther
2015/03/04 11:59:39
Done.
| |
| 1594 Send node, | |
| 1595 Node left, | |
| 1596 Node right, | |
| 1597 A arg); | |
| 1598 | |
| 1599 /// Lazy or, ||, expression with operands [left] and [right]. | |
| 1600 /// | |
| 1601 /// For instance | |
| 1602 /// m() => left || right; | |
| 1603 /// | |
| 1604 R visitLazyOr( | |
| 1605 Send node, | |
| 1606 Node left, | |
| 1607 Node right, | |
| 1608 A arg); | |
| 1609 | |
| 1610 /// Is test of [expression] against [type]. | |
| 1611 /// | |
| 1612 /// For instance | |
| 1613 /// class C {} | |
| 1614 /// m() => expression is C; | |
| 1615 /// | |
| 1616 R visitIs( | |
| 1617 Send node, | |
| 1618 Node expression, | |
| 1619 DartType type, | |
| 1620 A arg); | |
| 1621 | |
| 1622 /// Is not test of [expression] against [type]. | |
| 1623 /// | |
| 1624 /// For instance | |
| 1625 /// class C {} | |
| 1626 /// m() => expression is! C; | |
| 1627 /// | |
| 1628 R visitIsNot( | |
| 1629 Send node, | |
| 1630 Node expression, | |
| 1631 DartType type, | |
| 1632 A arg); | |
| 1633 | |
| 1634 /// As cast of [expression] to [type]. | |
| 1635 /// | |
| 1636 /// For instance | |
| 1637 /// class C {} | |
| 1638 /// m() => expression as C; | |
| 1639 /// | |
| 1640 R visitAs( | |
| 1641 Send node, | |
| 1642 Node expression, | |
| 1643 DartType type, | |
| 1644 A arg); | |
| 1645 | |
| 1646 /// Compound assignment expression of [rhs] with [operator] of the property on | |
| 1647 /// [receiver] whose getter and setter are½ defined by [getterSelector] and | |
|
karlklose
2015/02/25 12:39:38
I think they are fully defined!
Johnni Winther
2015/03/04 11:59:39
They are, I've checked ;-)
| |
| 1648 /// [setterSelector], respectively. | |
| 1649 /// | |
| 1650 /// For instance: | |
| 1651 /// m(receiver, rhs) => receiver.foo += rhs; | |
| 1652 /// | |
| 1653 R visitDynamicPropertyCompound( | |
| 1654 Send node, | |
| 1655 Node receiver, | |
| 1656 AssignmentOperator operator, | |
| 1657 Node rhs, | |
| 1658 Selector getterSelector, | |
| 1659 Selector setterSelector, | |
| 1660 A arg); | |
| 1661 | |
| 1662 /// Compound assignment expression of [rhs] with [operator] of the property on | |
| 1663 /// `this` whose getter and setter are defined by [getterSelector] and | |
| 1664 /// [setterSelector], respectively. | |
| 1665 /// | |
| 1666 /// For instance: | |
| 1667 /// class C { | |
| 1668 /// m(rhs) => this.foo += rhs; | |
| 1669 /// } | |
| 1670 /// or | |
| 1671 /// class C { | |
| 1672 /// m(rhs) => foo += rhs; | |
| 1673 /// } | |
| 1674 /// | |
| 1675 R visitThisPropertyCompound( | |
| 1676 Send node, | |
| 1677 AssignmentOperator operator, | |
| 1678 Node rhs, | |
| 1679 Selector getterSelector, | |
| 1680 Selector setterSelector, | |
| 1681 A arg); | |
| 1682 | |
| 1683 /// Compound assignment expression of [rhs] with [operator] on a [parameter]. | |
| 1684 /// | |
| 1685 /// For instance: | |
| 1686 /// m(parameter, rhs) => parameter += rhs; | |
| 1687 /// | |
| 1688 R visitParameterCompound( | |
| 1689 Send node, | |
| 1690 ParameterElement parameter, | |
| 1691 AssignmentOperator operator, | |
| 1692 Node rhs, | |
| 1693 A arg); | |
| 1694 | |
| 1695 /// Compound assignment expression of [rhs] with [operator] on a final | |
| 1696 /// [parameter]. | |
| 1697 /// | |
| 1698 /// For instance: | |
| 1699 /// m(final parameter, rhs) => parameter += rhs; | |
| 1700 /// | |
| 1701 R errorFinalParameterCompound( | |
| 1702 Send node, | |
| 1703 ParameterElement parameter, | |
| 1704 AssignmentOperator operator, | |
| 1705 Node rhs, | |
| 1706 A arg); | |
| 1707 | |
| 1708 /// Compound assignment expression of [rhs] with [operator] on a local | |
| 1709 /// [variable]. | |
| 1710 /// | |
| 1711 /// For instance: | |
| 1712 /// m(rhs) { | |
| 1713 /// var variable; | |
| 1714 /// variable += rhs; | |
| 1715 /// } | |
| 1716 /// | |
| 1717 R visitLocalVariableCompound( | |
| 1718 Send node, | |
| 1719 LocalVariableElement variable, | |
| 1720 AssignmentOperator operator, | |
| 1721 Node rhs, | |
| 1722 A arg); | |
| 1723 | |
| 1724 /// Compound assignment expression of [rhs] with [operator] on a final local | |
| 1725 /// [variable]. | |
| 1726 /// | |
| 1727 /// For instance: | |
| 1728 /// m(rhs) { | |
| 1729 /// final variable = 0; | |
| 1730 /// variable += rhs; | |
| 1731 /// } | |
| 1732 /// | |
| 1733 R errorFinalLocalVariableCompound( | |
| 1734 Send node, | |
| 1735 LocalVariableElement variable, | |
| 1736 AssignmentOperator operator, | |
| 1737 Node rhs, | |
| 1738 A arg); | |
| 1739 | |
| 1740 /// Compound assignment expression of [rhs] with [operator] on a local | |
| 1741 /// [function]. | |
| 1742 /// | |
| 1743 /// For instance: | |
| 1744 /// m(rhs) { | |
| 1745 /// function() {} | |
| 1746 /// function += rhs; | |
| 1747 /// } | |
| 1748 /// | |
| 1749 R errorLocalFunctionCompound( | |
| 1750 Send node, | |
| 1751 LocalFunctionElement function, | |
| 1752 AssignmentOperator operator, | |
| 1753 Node rhs, | |
| 1754 A arg); | |
| 1755 | |
| 1756 /// Compound assignment expression of [rhs] with [operator] on a static | |
| 1757 /// [field]. | |
| 1758 /// | |
| 1759 /// For instance: | |
| 1760 /// class C { | |
| 1761 /// static var field; | |
| 1762 /// m(rhs) => field += rhs; | |
| 1763 /// } | |
| 1764 /// | |
| 1765 R visitStaticFieldCompound( | |
| 1766 Send node, | |
| 1767 FieldElement field, | |
| 1768 AssignmentOperator operator, | |
| 1769 Node rhs, | |
| 1770 A arg); | |
| 1771 | |
| 1772 /// Compound assignment expression of [rhs] with [operator] on a final static | |
| 1773 /// [field]. | |
| 1774 /// | |
| 1775 /// For instance: | |
| 1776 /// class C { | |
| 1777 /// static final field = 0; | |
| 1778 /// m(rhs) => field += rhs; | |
| 1779 /// } | |
| 1780 /// | |
| 1781 R errorFinalStaticFieldCompound( | |
| 1782 Send node, | |
| 1783 FieldElement field, | |
| 1784 AssignmentOperator operator, | |
| 1785 Node rhs, | |
| 1786 A arg); | |
| 1787 | |
| 1788 /// Compound assignment expression of [rhs] with [operator] reading from a | |
| 1789 /// static [getter] and writing to a static [setter]. | |
| 1790 /// | |
| 1791 /// For instance: | |
| 1792 /// class C { | |
| 1793 /// static get o => 0; | |
| 1794 /// static set o(_) {} | |
| 1795 /// m(rhs) => o += rhs; | |
| 1796 /// } | |
| 1797 /// | |
| 1798 R visitStaticGetterSetterCompound( | |
| 1799 Send node, | |
| 1800 FunctionElement getter, | |
| 1801 FunctionElement setter, | |
| 1802 AssignmentOperator operator, | |
| 1803 Node rhs, | |
| 1804 A arg); | |
| 1805 | |
| 1806 /// Compound assignment expression of [rhs] with [operator] reading from a | |
| 1807 /// static [method], that is, closurizing [method], and writing to a static | |
| 1808 /// [setter]. | |
| 1809 /// | |
| 1810 /// For instance: | |
| 1811 /// class C { | |
| 1812 /// static o() {} | |
| 1813 /// static set o(_) {} | |
| 1814 /// m(rhs) => o += rhs; | |
| 1815 /// } | |
| 1816 /// | |
| 1817 R visitStaticMethodSetterCompound( | |
| 1818 Send node, | |
| 1819 FunctionElement method, | |
| 1820 FunctionElement setter, | |
| 1821 AssignmentOperator operator, | |
| 1822 Node rhs, | |
| 1823 A arg); | |
| 1824 | |
| 1825 /// Compound assignment expression of [rhs] with [operator] on a top level | |
| 1826 /// [field]. | |
| 1827 /// | |
| 1828 /// For instance: | |
| 1829 /// var field; | |
| 1830 /// m(rhs) => field += rhs; | |
| 1831 /// | |
| 1832 R visitTopLevelFieldCompound( | |
| 1833 Send node, | |
| 1834 FieldElement field, | |
| 1835 AssignmentOperator operator, | |
| 1836 Node rhs, | |
| 1837 A arg); | |
| 1838 | |
| 1839 /// Compound assignment expression of [rhs] with [operator] on a final top | |
| 1840 /// level [field]. | |
| 1841 /// | |
| 1842 /// For instance: | |
| 1843 /// final field = 0; | |
| 1844 /// m(rhs) => field += rhs; | |
| 1845 /// | |
| 1846 R errorFinalTopLevelFieldCompound( | |
| 1847 Send node, | |
| 1848 FieldElement field, | |
| 1849 AssignmentOperator operator, | |
| 1850 Node rhs, | |
| 1851 A arg); | |
| 1852 | |
| 1853 /// Compound assignment expression of [rhs] with [operator] reading from a | |
| 1854 /// top level [getter] and writing to a top level [setter]. | |
| 1855 /// | |
| 1856 /// For instance: | |
| 1857 /// get o => 0; | |
| 1858 /// set o(_) {} | |
| 1859 /// m(rhs) => o += rhs; | |
| 1860 /// | |
| 1861 R visitTopLevelGetterSetterCompound( | |
| 1862 Send node, | |
| 1863 FunctionElement getter, | |
| 1864 FunctionElement setter, | |
| 1865 AssignmentOperator operator, | |
| 1866 Node rhs, | |
| 1867 A arg); | |
| 1868 | |
| 1869 /// Compound assignment expression of [rhs] with [operator] reading from a | |
| 1870 /// top level [method], that is, closurizing [method], and writing to a top | |
| 1871 /// level [setter]. | |
| 1872 /// | |
| 1873 /// For instance: | |
| 1874 /// o() {} | |
| 1875 /// set o(_) {} | |
| 1876 /// m(rhs) => o += rhs; | |
| 1877 /// | |
| 1878 R visitTopLevelMethodSetterCompound( | |
| 1879 Send node, | |
| 1880 FunctionElement method, | |
| 1881 FunctionElement setter, | |
| 1882 AssignmentOperator operator, | |
| 1883 Node rhs, | |
| 1884 A arg); | |
| 1885 | |
| 1886 /// Compound assignment expression of [rhs] with [operator] on a super | |
| 1887 /// [field]. | |
| 1888 /// | |
| 1889 /// For instance: | |
| 1890 /// class B { | |
| 1891 /// var field; | |
| 1892 /// } | |
| 1893 /// class C extends B { | |
| 1894 /// m(rhs) => super.field += rhs; | |
| 1895 /// } | |
| 1896 /// | |
| 1897 R visitSuperFieldCompound( | |
| 1898 Send node, | |
| 1899 FieldElement field, | |
| 1900 AssignmentOperator operator, | |
| 1901 Node rhs, | |
| 1902 A arg); | |
| 1903 | |
| 1904 /// Compound assignment expression of [rhs] with [operator] on a final super | |
| 1905 /// [field]. | |
| 1906 /// | |
| 1907 /// For instance: | |
| 1908 /// class B { | |
| 1909 /// final field = 0; | |
| 1910 /// } | |
| 1911 /// class C extends B { | |
| 1912 /// m(rhs) => super.field += rhs; | |
| 1913 /// } | |
| 1914 /// | |
| 1915 R errorFinalSuperFieldCompound( | |
| 1916 Send node, | |
| 1917 FieldElement field, | |
| 1918 AssignmentOperator operator, | |
| 1919 Node rhs, | |
| 1920 A arg); | |
| 1921 | |
| 1922 /// Compound assignment expression of [rhs] with [operator] reading from a | |
| 1923 /// super [getter] and writing to a super [setter]. | |
| 1924 /// | |
| 1925 /// For instance: | |
| 1926 /// class B { | |
| 1927 /// get o => 0; | |
| 1928 /// set o(_) {} | |
| 1929 /// } | |
| 1930 /// class C extends B { | |
| 1931 /// m(rhs) => super.o += rhs; | |
| 1932 /// } | |
| 1933 /// | |
| 1934 R visitSuperGetterSetterCompound( | |
| 1935 Send node, | |
| 1936 FunctionElement getter, | |
| 1937 FunctionElement setter, | |
| 1938 AssignmentOperator operator, | |
| 1939 Node rhs, | |
| 1940 A arg); | |
| 1941 | |
| 1942 /// Compound assignment expression of [rhs] with [operator] reading from a | |
| 1943 /// super [method], that is, closurizing [method], and writing to a super | |
| 1944 /// [setter]. | |
| 1945 /// | |
| 1946 /// For instance: | |
| 1947 /// class B { | |
| 1948 /// o() {} | |
| 1949 /// set o(_) {} | |
| 1950 /// } | |
| 1951 /// class C extends B { | |
| 1952 /// m(rhs) => super.o += rhs; | |
| 1953 /// } | |
| 1954 /// | |
| 1955 R visitSuperMethodSetterCompound( | |
| 1956 Send node, | |
| 1957 FunctionElement method, | |
| 1958 FunctionElement setter, | |
| 1959 AssignmentOperator operator, | |
| 1960 Node rhs, | |
| 1961 A arg); | |
| 1962 | |
| 1963 /// Compound assignment expression of [rhs] with [operator] reading from a | |
| 1964 /// super [field] and writing to a super [setter]. | |
| 1965 /// | |
| 1966 /// For instance: | |
| 1967 /// class A { | |
| 1968 /// var o; | |
| 1969 /// } | |
| 1970 /// class B extends A { | |
| 1971 /// set o(_) {} | |
| 1972 /// } | |
| 1973 /// class C extends B { | |
| 1974 /// m(rhs) => super.o += rhs; | |
| 1975 /// } | |
| 1976 /// | |
| 1977 R visitSuperFieldSetterCompound( | |
| 1978 Send node, | |
| 1979 FieldElement field, | |
| 1980 FunctionElement setter, | |
| 1981 AssignmentOperator operator, | |
| 1982 Node rhs, | |
| 1983 A arg); | |
| 1984 | |
| 1985 /// Compound assignment expression of [rhs] with [operator] reading from a | |
| 1986 /// super [getter] and writing to a super [field]. | |
| 1987 /// | |
| 1988 /// For instance: | |
| 1989 /// class A { | |
| 1990 /// var o; | |
| 1991 /// } | |
| 1992 /// class B extends A { | |
| 1993 /// get o => 0; | |
| 1994 /// } | |
| 1995 /// class C extends B { | |
| 1996 /// m(rhs) => super.o += rhs; | |
| 1997 /// } | |
| 1998 /// | |
| 1999 R visitSuperGetterFieldCompound( | |
| 2000 Send node, | |
| 2001 FunctionElement getter, | |
| 2002 FieldElement field, | |
| 2003 AssignmentOperator operator, | |
| 2004 Node rhs, | |
| 2005 A arg); | |
| 2006 | |
| 2007 /// Compound assignment expression of [rhs] with [operator] on a type literal | |
| 2008 /// for class [element]. | |
| 2009 /// | |
| 2010 /// For instance: | |
| 2011 /// class C {} | |
| 2012 /// m(rhs) => C += rhs; | |
| 2013 /// | |
| 2014 R visitClassTypeLiteralCompound( | |
| 2015 Send node, | |
| 2016 ClassElement element, | |
| 2017 AssignmentOperator operator, | |
| 2018 Node rhs, | |
| 2019 A arg); | |
| 2020 | |
| 2021 /// Compound assignment expression of [rhs] with [operator] on a type literal | |
| 2022 /// for typedef [element]. | |
| 2023 /// | |
| 2024 /// For instance: | |
| 2025 /// typedef F(); | |
| 2026 /// m(rhs) => F += rhs; | |
| 2027 /// | |
| 2028 R visitTypedefTypeLiteralCompound( | |
| 2029 Send node, | |
| 2030 TypedefElement element, | |
| 2031 AssignmentOperator operator, | |
| 2032 Node rhs, | |
| 2033 A arg); | |
| 2034 | |
| 2035 /// Compound assignment expression of [rhs] with [operator] on a type literal | |
| 2036 /// for type variable [element]. | |
| 2037 /// | |
| 2038 /// For instance: | |
| 2039 /// class C<T> { | |
| 2040 /// m(rhs) => T += rhs; | |
| 2041 /// } | |
| 2042 /// | |
| 2043 R visitTypeVariableTypeLiteralCompound( | |
| 2044 Send node, | |
| 2045 TypeVariableElement element, | |
| 2046 AssignmentOperator operator, | |
| 2047 Node rhs, | |
| 2048 A arg); | |
| 2049 | |
| 2050 /// Compound assignment expression of [rhs] with [operator] on the type | |
| 2051 /// literal for `dynamic`. | |
| 2052 /// | |
| 2053 /// For instance: | |
| 2054 /// m(rhs) => dynamic += rhs; | |
| 2055 /// | |
| 2056 R visitDynamicTypeLiteralCompound( | |
| 2057 Send node, | |
| 2058 AssignmentOperator operator, | |
| 2059 Node rhs, | |
| 2060 A arg); | |
| 2061 | |
| 2062 /// Compound assignment expression of [rhs] with [operator] on the index | |
| 2063 /// operators of [receiver] whose getter and setter are defined by | |
| 2064 /// [getterSelector] and [setterSelector], respectively. | |
| 2065 /// | |
| 2066 /// For instance: | |
| 2067 /// m(receiver, index, rhs) => receiver[index] += rhs; | |
| 2068 /// | |
| 2069 R visitCompoundIndexSet( | |
| 2070 Send node, | |
| 2071 Node receiver, | |
| 2072 Node index, | |
| 2073 AssignmentOperator operator, | |
| 2074 Node rhs, | |
| 2075 A arg); | |
| 2076 | |
| 2077 /// Compound assignment expression of [rhs] with [operator] on the index | |
| 2078 /// operators of a super class defined by [getter] and [setter]. | |
| 2079 /// | |
| 2080 /// For instance: | |
| 2081 /// class B { | |
| 2082 /// operator [](index) {} | |
| 2083 /// operator [](index, value) {} | |
| 2084 /// } | |
| 2085 /// class C extends B { | |
| 2086 /// m(index, rhs) => super[index] += rhs; | |
| 2087 /// } | |
| 2088 /// | |
| 2089 R visitSuperCompoundIndexSet( | |
| 2090 Send node, | |
| 2091 FunctionElement getter, | |
| 2092 FunctionElement setter, | |
| 2093 Node index, | |
| 2094 AssignmentOperator operator, | |
| 2095 Node rhs, | |
| 2096 A arg); | |
| 2097 | |
| 2098 /// Prefix expression with [operator] of the property on [receiver] whose | |
| 2099 /// getter and setter are defined by [getterSelector] and [setterSelector], | |
| 2100 /// respectively. | |
| 2101 /// | |
| 2102 /// For instance: | |
| 2103 /// m(receiver) => ++receiver.foo; | |
| 2104 /// | |
| 2105 R visitDynamicPropertyPrefix( | |
| 2106 Send node, | |
| 2107 Node receiver, | |
| 2108 IncDecOperator operator, | |
| 2109 Selector getterSelector, | |
| 2110 Selector setterSelector, | |
| 2111 A arg); | |
| 2112 | |
| 2113 /// Prefix expression with [operator] on a [parameter]. | |
| 2114 /// | |
| 2115 /// For instance: | |
| 2116 /// m(parameter) => ++parameter; | |
| 2117 /// | |
| 2118 R visitParameterPrefix( | |
| 2119 Send node, | |
| 2120 ParameterElement parameter, | |
| 2121 IncDecOperator operator, | |
| 2122 A arg); | |
| 2123 | |
| 2124 /// Prefix expression with [operator] on a local [variable]. | |
| 2125 /// | |
| 2126 /// For instance: | |
| 2127 /// m() { | |
| 2128 /// var variable; | |
| 2129 /// ++variable; | |
| 2130 /// } | |
| 2131 /// | |
| 2132 R visitLocalVariablePrefix( | |
| 2133 Send node, | |
| 2134 LocalVariableElement variable, | |
| 2135 IncDecOperator operator, | |
| 2136 A arg); | |
| 2137 | |
| 2138 /// Prefix expression with [operator] on a local [function]. | |
| 2139 /// | |
| 2140 /// For instance: | |
| 2141 /// m() { | |
| 2142 /// function() {} | |
| 2143 /// ++function; | |
| 2144 /// } | |
| 2145 /// | |
| 2146 R errorLocalFunctionPrefix( | |
| 2147 Send node, | |
| 2148 LocalFunctionElement function, | |
| 2149 IncDecOperator operator, | |
| 2150 A arg); | |
| 2151 | |
| 2152 | |
| 2153 /// Prefix expression with [operator] of the property on `this` whose getter | |
| 2154 /// and setter are defined by [getterSelector] and [setterSelector], | |
| 2155 /// respectively. | |
| 2156 /// | |
| 2157 /// For instance: | |
| 2158 /// class C { | |
| 2159 /// m() => ++foo; | |
| 2160 /// } | |
| 2161 /// or | |
| 2162 /// class C { | |
| 2163 /// m() => ++this.foo; | |
| 2164 /// } | |
| 2165 /// | |
| 2166 R visitThisPropertyPrefix( | |
| 2167 Send node, | |
| 2168 IncDecOperator operator, | |
| 2169 Selector getterSelector, | |
| 2170 Selector setterSelector, | |
| 2171 A arg); | |
| 2172 | |
| 2173 /// Prefix expression with [operator] on a static [field]. | |
| 2174 /// | |
| 2175 /// For instance: | |
| 2176 /// class C { | |
| 2177 /// static var field; | |
| 2178 /// m() => ++field; | |
| 2179 /// } | |
| 2180 /// | |
| 2181 R visitStaticFieldPrefix( | |
| 2182 Send node, | |
| 2183 FieldElement field, | |
| 2184 IncDecOperator operator, | |
| 2185 A arg); | |
| 2186 | |
| 2187 /// Prefix expression with [operator] reading from a static [getter] and | |
| 2188 /// writing to a static [setter]. | |
| 2189 /// | |
| 2190 /// For instance: | |
| 2191 /// class C { | |
| 2192 /// static get o => 0; | |
| 2193 /// static set o(_) {} | |
| 2194 /// m() => ++o; | |
| 2195 /// } | |
| 2196 /// | |
| 2197 R visitStaticGetterSetterPrefix( | |
| 2198 Send node, | |
| 2199 FunctionElement getter, | |
| 2200 FunctionElement setter, | |
| 2201 IncDecOperator operator, | |
| 2202 A arg); | |
| 2203 | |
| 2204 | |
| 2205 /// Prefix expression with [operator] reading from a static [method], that is, | |
| 2206 /// closurizing [method], and writing to a static [setter]. | |
| 2207 /// | |
| 2208 /// For instance: | |
| 2209 /// class C { | |
| 2210 /// static o() {} | |
| 2211 /// static set o(_) {} | |
| 2212 /// m() => ++o; | |
| 2213 /// } | |
| 2214 /// | |
| 2215 R visitStaticMethodSetterPrefix( | |
| 2216 Send node, | |
| 2217 FunctionElement getter, | |
| 2218 FunctionElement setter, | |
| 2219 IncDecOperator operator, | |
| 2220 A arg); | |
| 2221 | |
| 2222 /// Prefix expression with [operator] on a top level [field]. | |
| 2223 /// | |
| 2224 /// For instance: | |
| 2225 /// var field; | |
| 2226 /// m() => ++field; | |
| 2227 /// | |
| 2228 R visitTopLevelFieldPrefix( | |
| 2229 Send node, | |
| 2230 FieldElement field, | |
| 2231 IncDecOperator operator, | |
| 2232 A arg); | |
| 2233 | |
| 2234 /// Prefix expression with [operator] reading from a top level [getter] and | |
| 2235 /// writing to a top level [setter]. | |
| 2236 /// | |
| 2237 /// For instance: | |
| 2238 /// get o => 0; | |
| 2239 /// set o(_) {} | |
| 2240 /// m() => ++o; | |
| 2241 /// | |
| 2242 R visitTopLevelGetterSetterPrefix( | |
| 2243 Send node, | |
| 2244 FunctionElement getter, | |
| 2245 FunctionElement setter, | |
| 2246 IncDecOperator operator, | |
| 2247 A arg); | |
| 2248 | |
| 2249 /// Prefix expression with [operator] reading from a top level [method], that | |
| 2250 /// is, closurizing [method], and writing to a top level [setter]. | |
| 2251 /// | |
| 2252 /// For instance: | |
| 2253 /// o() {} | |
| 2254 /// set o(_) {} | |
| 2255 /// m() => ++o; | |
| 2256 /// | |
| 2257 R visitTopLevelMethodSetterPrefix( | |
| 2258 Send node, | |
| 2259 FunctionElement method, | |
| 2260 FunctionElement setter, | |
| 2261 IncDecOperator operator, | |
| 2262 A arg); | |
| 2263 | |
| 2264 /// Prefix expression with [operator] on a super [field]. | |
| 2265 /// | |
| 2266 /// For instance: | |
| 2267 /// class B { | |
| 2268 /// var field; | |
| 2269 /// } | |
| 2270 /// class C extends B { | |
| 2271 /// m() => ++super.field; | |
| 2272 /// } | |
| 2273 /// | |
| 2274 R visitSuperFieldPrefix( | |
| 2275 Send node, | |
| 2276 FieldElement field, | |
| 2277 IncDecOperator operator, | |
| 2278 A arg); | |
| 2279 | |
| 2280 /// Prefix expression with [operator] reading from the super field [readField] | |
| 2281 /// and writint to the different super field [writtenField]. | |
| 2282 /// | |
| 2283 /// For instance: | |
| 2284 /// class A { | |
| 2285 /// var field; | |
| 2286 /// } | |
| 2287 /// class B extends A { | |
| 2288 /// final field; | |
| 2289 /// } | |
| 2290 /// class C extends B { | |
| 2291 /// m() => ++super.field; | |
| 2292 /// } | |
| 2293 /// | |
| 2294 R visitSuperFieldFieldPrefix( | |
| 2295 Send node, | |
| 2296 FieldElement readField, | |
| 2297 FieldElement writtenField, | |
| 2298 IncDecOperator operator, | |
| 2299 A arg); | |
| 2300 | |
| 2301 /// Prefix expression with [operator] reading from a super [field] and writing | |
| 2302 /// to a super [setter]. | |
| 2303 /// | |
| 2304 /// For instance: | |
| 2305 /// class A { | |
| 2306 /// var field; | |
| 2307 /// } | |
| 2308 /// class B extends A { | |
| 2309 /// set field(_) {} | |
| 2310 /// } | |
| 2311 /// class C extends B { | |
| 2312 /// m() => ++super.field; | |
| 2313 /// } | |
| 2314 /// | |
| 2315 R visitSuperFieldSetterPrefix( | |
| 2316 Send node, | |
| 2317 FieldElement field, | |
| 2318 FunctionElement setter, | |
| 2319 IncDecOperator operator, | |
| 2320 A arg); | |
| 2321 | |
| 2322 | |
| 2323 /// Prefix expression with [operator] reading from a super [getter] and | |
| 2324 /// writing to a super [setter]. | |
| 2325 /// | |
| 2326 /// For instance: | |
| 2327 /// class B { | |
| 2328 /// get field => 0; | |
| 2329 /// set field(_) {} | |
| 2330 /// } | |
| 2331 /// class C extends B { | |
| 2332 /// m() => ++super.field; | |
| 2333 /// } | |
| 2334 /// | |
| 2335 R visitSuperGetterSetterPrefix( | |
| 2336 Send node, | |
| 2337 FunctionElement getter, | |
| 2338 FunctionElement setter, | |
| 2339 IncDecOperator operator, | |
| 2340 A arg); | |
| 2341 | |
| 2342 /// Prefix expression with [operator] reading from a super [getter] and | |
| 2343 /// writing to a super [field]. | |
| 2344 /// | |
| 2345 /// For instance: | |
| 2346 /// class A { | |
| 2347 /// var field; | |
| 2348 /// } | |
| 2349 /// class B extends A { | |
| 2350 /// get field => 0; | |
| 2351 /// } | |
| 2352 /// class C extends B { | |
| 2353 /// m() => ++super.field; | |
| 2354 /// } | |
| 2355 /// | |
| 2356 R visitSuperGetterFieldPrefix( | |
| 2357 Send node, | |
| 2358 FunctionElement getter, | |
| 2359 FieldElement field, | |
| 2360 IncDecOperator operator, | |
| 2361 A arg); | |
| 2362 | |
| 2363 /// Prefix expression with [operator] reading from a super [method], that is, | |
| 2364 /// closurizing [method], and writing to a super [setter]. | |
| 2365 /// | |
| 2366 /// For instance: | |
| 2367 /// class B { | |
| 2368 /// o() {} | |
| 2369 /// set o(_) {} | |
| 2370 /// } | |
| 2371 /// class C extends B { | |
| 2372 /// m() => ++super.o; | |
| 2373 /// } | |
| 2374 /// | |
| 2375 R visitSuperMethodSetterPrefix( | |
| 2376 Send node, | |
| 2377 FunctionElement method, | |
| 2378 FunctionElement setter, | |
| 2379 IncDecOperator operator, | |
| 2380 A arg); | |
| 2381 | |
| 2382 /// Prefix expression with [operator] on a type literal for a class [element]. | |
| 2383 /// | |
| 2384 /// For instance: | |
| 2385 /// class C {} | |
| 2386 /// m() => ++C; | |
| 2387 /// | |
| 2388 R visitClassTypeLiteralPrefix( | |
| 2389 Send node, | |
| 2390 ClassElement element, | |
| 2391 IncDecOperator operator, | |
| 2392 A arg); | |
| 2393 | |
| 2394 /// Prefix expression with [operator] on a type literal for a typedef | |
| 2395 /// [element]. | |
| 2396 /// | |
| 2397 /// For instance: | |
| 2398 /// typedef F(); | |
| 2399 /// m() => ++F; | |
| 2400 /// | |
| 2401 R visitTypedefTypeLiteralPrefix( | |
| 2402 Send node, | |
| 2403 TypedefElement element, | |
| 2404 IncDecOperator operator, | |
| 2405 A arg); | |
| 2406 | |
| 2407 /// Prefix expression with [operator] on a type literal for a type variable | |
| 2408 /// [element]. | |
| 2409 /// | |
| 2410 /// For instance: | |
| 2411 /// class C<T> { | |
| 2412 /// m() => ++T; | |
| 2413 /// } | |
| 2414 /// | |
| 2415 R visitTypeVariableTypeLiteralPrefix( | |
| 2416 Send node, | |
| 2417 TypeVariableElement element, | |
| 2418 IncDecOperator operator, | |
| 2419 A arg); | |
| 2420 | |
| 2421 /// Prefix expression with [operator] on the type literal for `dynamic`. | |
| 2422 /// | |
| 2423 /// For instance: | |
| 2424 /// m() => ++dynamic; | |
| 2425 /// | |
| 2426 R visitDynamicTypeLiteralPrefix( | |
| 2427 Send node, | |
| 2428 IncDecOperator operator, | |
| 2429 A arg); | |
| 2430 | |
| 2431 /// Postfix expression with [operator] of the property on [receiver] whose | |
| 2432 /// getter and setter are defined by [getterSelector] and [setterSelector], | |
| 2433 /// respectively. | |
| 2434 /// | |
| 2435 /// For instance: | |
| 2436 /// m(receiver) => receiver.foo++; | |
| 2437 /// | |
| 2438 R visitDynamicPropertyPostfix( | |
| 2439 Send node, | |
| 2440 Node receiver, | |
| 2441 IncDecOperator operator, | |
| 2442 Selector getterSelector, | |
| 2443 Selector setterSelector, | |
| 2444 A arg); | |
| 2445 | |
| 2446 /// Postfix expression with [operator] on a [parameter]. | |
| 2447 /// | |
| 2448 /// For instance: | |
| 2449 /// m(parameter) => parameter++; | |
| 2450 /// | |
| 2451 R visitParameterPostfix( | |
| 2452 Send node, | |
| 2453 ParameterElement parameter, | |
| 2454 IncDecOperator operator, | |
| 2455 A arg); | |
| 2456 | |
| 2457 /// Postfix expression with [operator] on a local [variable]. | |
| 2458 /// | |
| 2459 /// For instance: | |
| 2460 /// m() { | |
| 2461 /// var variable; | |
| 2462 /// variable++; | |
| 2463 /// } | |
| 2464 /// | |
| 2465 R visitLocalVariablePostfix( | |
| 2466 Send node, | |
| 2467 LocalVariableElement variable, | |
| 2468 IncDecOperator operator, | |
| 2469 A arg); | |
| 2470 | |
| 2471 /// Postfix expression with [operator] on a local [function]. | |
| 2472 /// | |
| 2473 /// For instance: | |
| 2474 /// m() { | |
| 2475 /// function() {} | |
| 2476 /// function++; | |
| 2477 /// } | |
| 2478 /// | |
| 2479 R errorLocalFunctionPostfix( | |
| 2480 Send node, | |
| 2481 LocalFunctionElement function, | |
| 2482 IncDecOperator operator, | |
| 2483 A arg); | |
| 2484 | |
| 2485 | |
| 2486 /// Postfix expression with [operator] of the property on `this` whose getter | |
| 2487 /// and setter are defined by [getterSelector] and [setterSelector], | |
| 2488 /// respectively. | |
| 2489 /// | |
| 2490 /// For instance: | |
| 2491 /// class C { | |
| 2492 /// m() => foo++; | |
| 2493 /// } | |
| 2494 /// or | |
| 2495 /// class C { | |
| 2496 /// m() => this.foo++; | |
| 2497 /// } | |
| 2498 /// | |
| 2499 R visitThisPropertyPostfix( | |
| 2500 Send node, | |
| 2501 IncDecOperator operator, | |
| 2502 Selector getterSelector, | |
| 2503 Selector setterSelector, | |
| 2504 A arg); | |
| 2505 | |
| 2506 /// Postfix expression with [operator] on a static [field]. | |
| 2507 /// | |
| 2508 /// For instance: | |
| 2509 /// class C { | |
| 2510 /// static var field; | |
| 2511 /// m() => field++; | |
| 2512 /// } | |
| 2513 /// | |
| 2514 R visitStaticFieldPostfix( | |
| 2515 Send node, | |
| 2516 FieldElement field, | |
| 2517 IncDecOperator operator, | |
| 2518 A arg); | |
| 2519 | |
| 2520 /// Postfix expression with [operator] reading from a static [getter] and | |
| 2521 /// writing to a static [setter]. | |
| 2522 /// | |
| 2523 /// For instance: | |
| 2524 /// class C { | |
| 2525 /// static get o => 0; | |
| 2526 /// static set o(_) {} | |
| 2527 /// m() => o++; | |
| 2528 /// } | |
| 2529 /// | |
| 2530 R visitStaticGetterSetterPostfix( | |
| 2531 Send node, | |
| 2532 FunctionElement getter, | |
| 2533 FunctionElement setter, | |
| 2534 IncDecOperator operator, | |
| 2535 A arg); | |
| 2536 | |
| 2537 | |
| 2538 /// Postfix expression with [operator] reading from a static [method], that is , | |
|
karlklose
2015/02/25 12:39:39
long line.
Johnni Winther
2015/03/04 11:59:39
Done.
| |
| 2539 /// closurizing [method], and writing to a static [setter]. | |
| 2540 /// | |
| 2541 /// For instance: | |
| 2542 /// class C { | |
| 2543 /// static o() {} | |
| 2544 /// static set o(_) {} | |
| 2545 /// m() => o++; | |
| 2546 /// } | |
| 2547 /// | |
| 2548 R visitStaticMethodSetterPostfix( | |
| 2549 Send node, | |
| 2550 FunctionElement getter, | |
| 2551 FunctionElement setter, | |
| 2552 IncDecOperator operator, | |
| 2553 A arg); | |
| 2554 | |
| 2555 /// Postfix expression with [operator] on a top level [field]. | |
| 2556 /// | |
| 2557 /// For instance: | |
| 2558 /// var field; | |
| 2559 /// m() => field++; | |
| 2560 /// | |
| 2561 R visitTopLevelFieldPostfix( | |
| 2562 Send node, | |
| 2563 FieldElement field, | |
| 2564 IncDecOperator operator, | |
| 2565 A arg); | |
| 2566 | |
| 2567 /// Postfix expression with [operator] reading from a top level [getter] and | |
| 2568 /// writing to a top level [setter]. | |
| 2569 /// | |
| 2570 /// For instance: | |
| 2571 /// get o => 0; | |
| 2572 /// set o(_) {} | |
| 2573 /// m() => o++; | |
| 2574 /// | |
| 2575 R visitTopLevelGetterSetterPostfix( | |
| 2576 Send node, | |
| 2577 FunctionElement getter, | |
| 2578 FunctionElement setter, | |
| 2579 IncDecOperator operator, | |
| 2580 A arg); | |
| 2581 | |
| 2582 /// Postfix expression with [operator] reading from a top level [method], that | |
| 2583 /// is, closurizing [method], and writing to a top level [setter]. | |
| 2584 /// | |
| 2585 /// For instance: | |
| 2586 /// o() {} | |
| 2587 /// set o(_) {} | |
| 2588 /// m() => o++; | |
| 2589 /// | |
| 2590 R visitTopLevelMethodSetterPostfix( | |
| 2591 Send node, | |
| 2592 FunctionElement method, | |
| 2593 FunctionElement setter, | |
| 2594 IncDecOperator operator, | |
| 2595 A arg); | |
| 2596 | |
| 2597 /// Postfix expression with [operator] on a super [field]. | |
| 2598 /// | |
| 2599 /// For instance: | |
| 2600 /// class B { | |
| 2601 /// var field; | |
| 2602 /// } | |
| 2603 /// class C extends B { | |
| 2604 /// m() => super.field++; | |
| 2605 /// } | |
| 2606 /// | |
| 2607 R visitSuperFieldPostfix( | |
| 2608 Send node, | |
| 2609 FieldElement field, | |
| 2610 IncDecOperator operator, | |
| 2611 A arg); | |
| 2612 | |
| 2613 /// Postfix expression with [operator] reading from the super field [readField ] | |
|
karlklose
2015/02/25 12:39:38
Long line.
Johnni Winther
2015/03/04 11:59:39
Done.
| |
| 2614 /// and writint to the different super field [writtenField]. | |
| 2615 /// | |
| 2616 /// For instance: | |
| 2617 /// class A { | |
| 2618 /// var field; | |
| 2619 /// } | |
| 2620 /// class B extends A { | |
| 2621 /// final field; | |
| 2622 /// } | |
| 2623 /// class C extends B { | |
| 2624 /// m() => super.field++; | |
| 2625 /// } | |
| 2626 /// | |
| 2627 R visitSuperFieldFieldPostfix( | |
| 2628 Send node, | |
| 2629 FieldElement readField, | |
| 2630 FieldElement writtenField, | |
| 2631 IncDecOperator operator, | |
| 2632 A arg); | |
| 2633 | |
| 2634 /// Postfix expression with [operator] reading from a super [field] and writin g | |
|
karlklose
2015/02/25 12:39:38
Long line.
Johnni Winther
2015/03/04 11:59:39
Done.
| |
| 2635 /// to a super [setter]. | |
| 2636 /// | |
| 2637 /// For instance: | |
| 2638 /// class A { | |
| 2639 /// var field; | |
| 2640 /// } | |
| 2641 /// class B extends A { | |
| 2642 /// set field(_) {} | |
| 2643 /// } | |
| 2644 /// class C extends B { | |
| 2645 /// m() => super.field++; | |
| 2646 /// } | |
| 2647 /// | |
| 2648 R visitSuperFieldSetterPostfix( | |
| 2649 Send node, | |
| 2650 FieldElement field, | |
| 2651 FunctionElement setter, | |
| 2652 IncDecOperator operator, | |
| 2653 A arg); | |
| 2654 | |
| 2655 | |
| 2656 /// Postfix expression with [operator] reading from a super [getter] and | |
| 2657 /// writing to a super [setter]. | |
| 2658 /// | |
| 2659 /// For instance: | |
| 2660 /// class B { | |
| 2661 /// get field => 0; | |
| 2662 /// set field(_) {} | |
| 2663 /// } | |
| 2664 /// class C extends B { | |
| 2665 /// m() => super.field++; | |
| 2666 /// } | |
| 2667 /// | |
| 2668 R visitSuperGetterSetterPostfix( | |
| 2669 Send node, | |
| 2670 FunctionElement getter, | |
| 2671 FunctionElement setter, | |
| 2672 IncDecOperator operator, | |
| 2673 A arg); | |
| 2674 | |
| 2675 /// Postfix expression with [operator] reading from a super [getter] and | |
| 2676 /// writing to a super [field]. | |
| 2677 /// | |
| 2678 /// For instance: | |
| 2679 /// class A { | |
| 2680 /// var field; | |
| 2681 /// } | |
| 2682 /// class B extends A { | |
| 2683 /// get field => 0; | |
| 2684 /// } | |
| 2685 /// class C extends B { | |
| 2686 /// m() => super.field++; | |
| 2687 /// } | |
| 2688 /// | |
| 2689 R visitSuperGetterFieldPostfix( | |
| 2690 Send node, | |
| 2691 FunctionElement getter, | |
| 2692 FieldElement field, | |
| 2693 IncDecOperator operator, | |
| 2694 A arg); | |
| 2695 | |
| 2696 /// Postfix expression with [operator] reading from a super [method], that is, | |
| 2697 /// closurizing [method], and writing to a super [setter]. | |
| 2698 /// | |
| 2699 /// For instance: | |
| 2700 /// class B { | |
| 2701 /// o() {} | |
| 2702 /// set o(_) {} | |
| 2703 /// } | |
| 2704 /// class C extends B { | |
| 2705 /// m() => super.o++; | |
| 2706 /// } | |
| 2707 /// | |
| 2708 R visitSuperMethodSetterPostfix( | |
| 2709 Send node, | |
| 2710 FunctionElement method, | |
| 2711 FunctionElement setter, | |
| 2712 IncDecOperator operator, | |
| 2713 A arg); | |
| 2714 | |
| 2715 /// Postfix expression with [operator] on a type literal for a class [element] . | |
|
karlklose
2015/02/25 12:39:39
Long line.
Johnni Winther
2015/03/04 11:59:39
Done.
| |
| 2716 /// | |
| 2717 /// For instance: | |
| 2718 /// class C {} | |
| 2719 /// m() => C++; | |
| 2720 /// | |
| 2721 R visitClassTypeLiteralPostfix( | |
| 2722 Send node, | |
| 2723 ClassElement element, | |
| 2724 IncDecOperator operator, | |
| 2725 A arg); | |
| 2726 | |
| 2727 /// Postfix expression with [operator] on a type literal for a typedef | |
| 2728 /// [element]. | |
| 2729 /// | |
| 2730 /// For instance: | |
| 2731 /// typedef F(); | |
| 2732 /// m() => F++; | |
| 2733 /// | |
| 2734 R visitTypedefTypeLiteralPostfix( | |
| 2735 Send node, | |
| 2736 TypedefElement element, | |
| 2737 IncDecOperator operator, | |
| 2738 A arg); | |
| 2739 | |
| 2740 /// Postfix expression with [operator] on a type literal for a type variable | |
| 2741 /// [element]. | |
| 2742 /// | |
| 2743 /// For instance: | |
| 2744 /// class C<T> { | |
| 2745 /// m() => T++; | |
| 2746 /// } | |
| 2747 /// | |
| 2748 R visitTypeVariableTypeLiteralPostfix( | |
| 2749 Send node, | |
| 2750 TypeVariableElement element, | |
| 2751 IncDecOperator operator, | |
| 2752 A arg); | |
| 2753 | |
| 2754 /// Postfix expression with [operator] on the type literal for `dynamic`. | |
| 2755 /// | |
| 2756 /// For instance: | |
| 2757 /// m() => dynamic++; | |
| 2758 /// | |
| 2759 R visitDynamicTypeLiteralPostfix( | |
| 2760 Send node, | |
| 2761 IncDecOperator operator, | |
| 2762 A arg); | |
| 2763 } | |
| OLD | NEW |