| OLD | NEW |
| 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 library elements; | 5 library elements; |
| 6 | 6 |
| 7 | 7 |
| 8 import '../tree/tree.dart'; | 8 import '../tree/tree.dart'; |
| 9 import '../util/util.dart'; | 9 import '../util/util.dart'; |
| 10 import '../resolution/resolution.dart'; | 10 import '../resolution/resolution.dart'; |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 // TODO(johnniwinther): Remove this method. | 520 // TODO(johnniwinther): Remove this method. |
| 521 static String reconstructConstructorName(Element element) { | 521 static String reconstructConstructorName(Element element) { |
| 522 String className = element.enclosingClass.name; | 522 String className = element.enclosingClass.name; |
| 523 if (element.name == '') { | 523 if (element.name == '') { |
| 524 return className; | 524 return className; |
| 525 } else { | 525 } else { |
| 526 return '$className\$${element.name}'; | 526 return '$className\$${element.name}'; |
| 527 } | 527 } |
| 528 } | 528 } |
| 529 | 529 |
| 530 static String constructorNameForDiagnostics(String className, |
| 531 String constructorName) { |
| 532 String classNameString = className; |
| 533 String constructorNameString = constructorName; |
| 534 return (constructorName == '') |
| 535 ? classNameString |
| 536 : "$classNameString.$constructorNameString"; |
| 537 } |
| 538 |
| 530 /// Returns `true` if [name] is the name of an operator method. | 539 /// Returns `true` if [name] is the name of an operator method. |
| 531 static bool isOperatorName(String name) { | 540 static bool isOperatorName(String name) { |
| 532 return name == 'unary-' || isUserDefinableOperator(name); | 541 return name == 'unary-' || isUserDefinableOperator(name); |
| 533 } | 542 } |
| 534 | 543 |
| 535 /** | 544 /** |
| 536 * Map an operator-name to a valid JavaScript identifier. | 545 * Map an operator-name to a valid JavaScript identifier. |
| 537 * | 546 * |
| 538 * For non-operator names, this method just returns its input. | 547 * For non-operator names, this method just returns its input. |
| 539 * | 548 * |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1325 bool get isDeclaredByField; | 1334 bool get isDeclaredByField; |
| 1326 | 1335 |
| 1327 /// Returns `true` if this member is abstract. | 1336 /// Returns `true` if this member is abstract. |
| 1328 bool get isAbstract; | 1337 bool get isAbstract; |
| 1329 | 1338 |
| 1330 /// If abstract, [implementation] points to the overridden concrete member, | 1339 /// If abstract, [implementation] points to the overridden concrete member, |
| 1331 /// if any. Otherwise [implementation] points to the member itself. | 1340 /// if any. Otherwise [implementation] points to the member itself. |
| 1332 Member get implementation; | 1341 Member get implementation; |
| 1333 } | 1342 } |
| 1334 | 1343 |
| OLD | NEW |