| OLD | NEW |
| 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 /// Mixins that implement convenience methods on [Element] subclasses. | 5 /// Mixins that implement convenience methods on [Element] subclasses. |
| 6 | 6 |
| 7 library elements.common; | 7 library elements.common; |
| 8 | 8 |
| 9 import '../common/names.dart' show Identifiers, Names, Uris; | 9 import '../common/names.dart' show Identifiers, Names, Uris; |
| 10 import '../core_types.dart' show CoreClasses; | 10 import '../core_types.dart' show CoreClasses; |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 } | 487 } |
| 488 return null; | 488 return null; |
| 489 } | 489 } |
| 490 | 490 |
| 491 void forEachBackendMember(void f(Element member)) { | 491 void forEachBackendMember(void f(Element member)) { |
| 492 backendMembers.forEach(f); | 492 backendMembers.forEach(f); |
| 493 } | 493 } |
| 494 } | 494 } |
| 495 | 495 |
| 496 abstract class FunctionSignatureCommon implements FunctionSignature { | 496 abstract class FunctionSignatureCommon implements FunctionSignature { |
| 497 DartType get returnType => type.returnType; |
| 498 |
| 497 void forEachRequiredParameter(void function(Element parameter)) { | 499 void forEachRequiredParameter(void function(Element parameter)) { |
| 498 requiredParameters.forEach(function); | 500 requiredParameters.forEach(function); |
| 499 } | 501 } |
| 500 | 502 |
| 501 void forEachOptionalParameter(void function(Element parameter)) { | 503 void forEachOptionalParameter(void function(Element parameter)) { |
| 502 optionalParameters.forEach(function); | 504 optionalParameters.forEach(function); |
| 503 } | 505 } |
| 504 | 506 |
| 505 void forEachParameter(void function(Element parameter)) { | 507 void forEachParameter(void function(Element parameter)) { |
| 506 forEachRequiredParameter(function); | 508 forEachRequiredParameter(function); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 @override | 637 @override |
| 636 bool get isBoolFromEnvironmentConstructor { | 638 bool get isBoolFromEnvironmentConstructor { |
| 637 return fromEnvironmentState == _FromEnvironmentState.BOOL; | 639 return fromEnvironmentState == _FromEnvironmentState.BOOL; |
| 638 } | 640 } |
| 639 | 641 |
| 640 @override | 642 @override |
| 641 bool get isStringFromEnvironmentConstructor { | 643 bool get isStringFromEnvironmentConstructor { |
| 642 return fromEnvironmentState == _FromEnvironmentState.STRING; | 644 return fromEnvironmentState == _FromEnvironmentState.STRING; |
| 643 } | 645 } |
| 644 } | 646 } |
| OLD | NEW |