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

Side by Side Diff: pkg/compiler/lib/src/tree/nodes.dart

Issue 1090923004: Make super.foo= erroneous if they are not assignable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of tree; 5 part of tree;
6 6
7 abstract class Visitor<R> { 7 abstract class Visitor<R> {
8 const Visitor(); 8 const Visitor();
9 9
10 R visitNode(Node node); 10 R visitNode(Node node);
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 visitChildren(Visitor visitor) { 376 visitChildren(Visitor visitor) {
377 if (receiver != null) receiver.accept(visitor); 377 if (receiver != null) receiver.accept(visitor);
378 if (selector != null) selector.accept(visitor); 378 if (selector != null) selector.accept(visitor);
379 if (argumentsNode != null) argumentsNode.accept(visitor); 379 if (argumentsNode != null) argumentsNode.accept(visitor);
380 } 380 }
381 381
382 int argumentCount() { 382 int argumentCount() {
383 return (argumentsNode == null) ? -1 : argumentsNode.slowLength(); 383 return (argumentsNode == null) ? -1 : argumentsNode.slowLength();
384 } 384 }
385 385
386 bool get isSuperCall { 386 bool get isSuperCall => receiver != null && receiver.isSuper();
387 return receiver != null && receiver.isSuper(); 387 bool get isThisCall => receiver != null && receiver.isThis();
388 }
389 bool get isOperator => selector is Operator; 388 bool get isOperator => selector is Operator;
390 bool get isPropertyAccess => argumentsNode == null; 389 bool get isPropertyAccess => argumentsNode == null;
391 bool get isFunctionObjectInvocation => selector == null; 390 bool get isFunctionObjectInvocation => selector == null;
392 bool get isPrefix => argumentsNode is Prefix; 391 bool get isPrefix => argumentsNode is Prefix;
393 bool get isPostfix => argumentsNode is Postfix; 392 bool get isPostfix => argumentsNode is Postfix;
394 bool get isCall => !isOperator && !isPropertyAccess; 393 bool get isCall => !isOperator && !isPropertyAccess;
395 bool get isIndex => 394 bool get isIndex =>
396 isOperator && identical(selector.asOperator().source, '[]'); 395 isOperator && identical(selector.asOperator().source, '[]');
397 bool get isLogicalAnd => 396 bool get isLogicalAnd =>
398 isOperator && identical(selector.asOperator().source, '&&'); 397 isOperator && identical(selector.asOperator().source, '&&');
(...skipping 1925 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 2323
2325 // VariableDefinitions. 2324 // VariableDefinitions.
2326 get metadata => null; 2325 get metadata => null;
2327 get type => null; 2326 get type => null;
2328 2327
2329 // Typedef. 2328 // Typedef.
2330 get typeParameters => null; 2329 get typeParameters => null;
2331 get formals => null; 2330 get formals => null;
2332 get typedefKeyword => null; 2331 get typedefKeyword => null;
2333 } 2332 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698