| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 analyzer.src.dart.element.element; | 5 library analyzer.src.dart.element.element; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:math' show min; | 8 import 'dart:math' show min; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 2246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2257 RedirectingConstructorInvocation initializer = | 2257 RedirectingConstructorInvocation initializer = |
| 2258 AstFactory.redirectingConstructorInvocation2( | 2258 AstFactory.redirectingConstructorInvocation2( |
| 2259 name.isNotEmpty ? name : null, arguments); | 2259 name.isNotEmpty ? name : null, arguments); |
| 2260 ConstructorElement element = name.isEmpty | 2260 ConstructorElement element = name.isEmpty |
| 2261 ? enclosingElement.unnamedConstructor | 2261 ? enclosingElement.unnamedConstructor |
| 2262 : enclosingElement.getNamedConstructor(name); | 2262 : enclosingElement.getNamedConstructor(name); |
| 2263 initializer.staticElement = element; | 2263 initializer.staticElement = element; |
| 2264 initializer.constructorName?.staticElement = element; | 2264 initializer.constructorName?.staticElement = element; |
| 2265 return initializer; | 2265 return initializer; |
| 2266 } | 2266 } |
| 2267 return null; |
| 2267 } | 2268 } |
| 2268 } | 2269 } |
| 2269 | 2270 |
| 2270 /** | 2271 /** |
| 2271 * A [TopLevelVariableElement] for a top-level 'const' variable that has an | 2272 * A [TopLevelVariableElement] for a top-level 'const' variable that has an |
| 2272 * initializer. | 2273 * initializer. |
| 2273 */ | 2274 */ |
| 2274 class ConstTopLevelVariableElementImpl extends TopLevelVariableElementImpl | 2275 class ConstTopLevelVariableElementImpl extends TopLevelVariableElementImpl |
| 2275 with ConstVariableElement { | 2276 with ConstVariableElement { |
| 2276 /** | 2277 /** |
| (...skipping 6164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8441 | 8442 |
| 8442 @override | 8443 @override |
| 8443 void visitElement(Element element) { | 8444 void visitElement(Element element) { |
| 8444 int offset = element.nameOffset; | 8445 int offset = element.nameOffset; |
| 8445 if (offset != -1) { | 8446 if (offset != -1) { |
| 8446 map[offset] = element; | 8447 map[offset] = element; |
| 8447 } | 8448 } |
| 8448 super.visitElement(element); | 8449 super.visitElement(element); |
| 8449 } | 8450 } |
| 8450 } | 8451 } |
| OLD | NEW |