| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'package:analyzer/src/generated/utilities_dart.dart'; | 5 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 6 import 'package:analyzer/src/summary/format.dart'; | 6 import 'package:analyzer/src/summary/format.dart'; |
| 7 import 'package:analyzer/src/summary/idl.dart'; | 7 import 'package:analyzer/src/summary/idl.dart'; |
| 8 import 'package:analyzer/src/summary/name_filter.dart'; | 8 import 'package:analyzer/src/summary/name_filter.dart'; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 executable.name, | 376 executable.name, |
| 377 new _Meaning( | 377 new _Meaning( |
| 378 unitNum, | 378 unitNum, |
| 379 executable.kind == UnlinkedExecutableKind.functionOrMethod | 379 executable.kind == UnlinkedExecutableKind.functionOrMethod |
| 380 ? ReferenceKind.topLevelFunction | 380 ? ReferenceKind.topLevelFunction |
| 381 : ReferenceKind.topLevelPropertyAccessor, | 381 : ReferenceKind.topLevelPropertyAccessor, |
| 382 0, | 382 0, |
| 383 executable.typeParameters.length)); | 383 executable.typeParameters.length)); |
| 384 } | 384 } |
| 385 for (UnlinkedTypedef typedef in unit.typedefs) { | 385 for (UnlinkedTypedef typedef in unit.typedefs) { |
| 386 privateNamespace.add( | 386 ReferenceKind kind; |
| 387 typedef.name, | 387 switch (typedef.style) { |
| 388 new _Meaning(unitNum, ReferenceKind.typedef, 0, | 388 case TypedefStyle.functionType: |
| 389 typedef.typeParameters.length)); | 389 kind = ReferenceKind.typedef; |
| 390 break; |
| 391 case TypedefStyle.genericFunctionType: |
| 392 kind = ReferenceKind.genericFunctionTypedef; |
| 393 break; |
| 394 } |
| 395 assert(kind != null); |
| 396 privateNamespace.add(typedef.name, |
| 397 new _Meaning(unitNum, kind, 0, typedef.typeParameters.length)); |
| 390 } | 398 } |
| 391 for (UnlinkedVariable variable in unit.variables) { | 399 for (UnlinkedVariable variable in unit.variables) { |
| 392 privateNamespace.add(variable.name, | 400 privateNamespace.add(variable.name, |
| 393 new _Meaning(unitNum, ReferenceKind.topLevelPropertyAccessor, 0, 0)); | 401 new _Meaning(unitNum, ReferenceKind.topLevelPropertyAccessor, 0, 0)); |
| 394 if (!(variable.isConst || variable.isFinal)) { | 402 if (!(variable.isConst || variable.isFinal)) { |
| 395 privateNamespace.add( | 403 privateNamespace.add( |
| 396 variable.name + '=', | 404 variable.name + '=', |
| 397 new _Meaning( | 405 new _Meaning( |
| 398 unitNum, ReferenceKind.topLevelPropertyAccessor, 0, 0)); | 406 unitNum, ReferenceKind.topLevelPropertyAccessor, 0, 0)); |
| 399 } | 407 } |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 String _selectUri( | 624 String _selectUri( |
| 617 String defaultUri, List<UnlinkedConfiguration> configurations) { | 625 String defaultUri, List<UnlinkedConfiguration> configurations) { |
| 618 for (UnlinkedConfiguration configuration in configurations) { | 626 for (UnlinkedConfiguration configuration in configurations) { |
| 619 if (getDeclaredVariable(configuration.name) == configuration.value) { | 627 if (getDeclaredVariable(configuration.name) == configuration.value) { |
| 620 return configuration.uri; | 628 return configuration.uri; |
| 621 } | 629 } |
| 622 } | 630 } |
| 623 return defaultUri; | 631 return defaultUri; |
| 624 } | 632 } |
| 625 } | 633 } |
| OLD | NEW |