| 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/dart/ast/ast.dart'; | 5 import 'package:analyzer/dart/ast/ast.dart'; |
| 6 import 'package:analyzer/dart/ast/resolution_accessors.dart'; |
| 6 import 'package:analyzer/dart/ast/token.dart'; | 7 import 'package:analyzer/dart/ast/token.dart'; |
| 7 import 'package:analyzer/dart/ast/visitor.dart'; | 8 import 'package:analyzer/dart/ast/visitor.dart'; |
| 8 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 9 import 'package:analyzer/dart/element/type.dart'; | 10 import 'package:analyzer/dart/element/type.dart'; |
| 10 import 'package:analyzer/src/dart/element/member.dart'; | 11 import 'package:analyzer/src/dart/element/member.dart'; |
| 11 import 'package:analyzer/src/generated/utilities_dart.dart'; | 12 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 12 import 'package:analyzer/src/summary/format.dart'; | 13 import 'package:analyzer/src/summary/format.dart'; |
| 13 import 'package:analyzer/src/summary/idl.dart'; | 14 import 'package:analyzer/src/summary/idl.dart'; |
| 14 | 15 |
| 15 /** | 16 /** |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 | 483 |
| 483 @override | 484 @override |
| 484 visitBinaryExpression(BinaryExpression node) { | 485 visitBinaryExpression(BinaryExpression node) { |
| 485 recordOperatorReference(node.operator, node.bestElement); | 486 recordOperatorReference(node.operator, node.bestElement); |
| 486 super.visitBinaryExpression(node); | 487 super.visitBinaryExpression(node); |
| 487 } | 488 } |
| 488 | 489 |
| 489 @override | 490 @override |
| 490 visitClassDeclaration(ClassDeclaration node) { | 491 visitClassDeclaration(ClassDeclaration node) { |
| 491 if (node.extendsClause == null) { | 492 if (node.extendsClause == null) { |
| 492 ClassElement objectElement = node.element.supertype?.element; | 493 ClassElement objectElement = |
| 494 elementForClassDeclaration(node).supertype?.element; |
| 493 recordRelationOffset(objectElement, IndexRelationKind.IS_EXTENDED_BY, | 495 recordRelationOffset(objectElement, IndexRelationKind.IS_EXTENDED_BY, |
| 494 node.name.offset, 0, true); | 496 node.name.offset, 0, true); |
| 495 } | 497 } |
| 496 recordIsAncestorOf(node.element); | 498 recordIsAncestorOf(node.element); |
| 497 super.visitClassDeclaration(node); | 499 super.visitClassDeclaration(node); |
| 498 } | 500 } |
| 499 | 501 |
| 500 @override | 502 @override |
| 501 visitClassTypeAlias(ClassTypeAlias node) { | 503 visitClassTypeAlias(ClassTypeAlias node) { |
| 502 recordIsAncestorOf(node.element); | 504 recordIsAncestorOf(node.element); |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 usedNameOffsets: nameRelations.map((r) => r.offset).toList(), | 901 usedNameOffsets: nameRelations.map((r) => r.offset).toList(), |
| 900 usedNameIsQualifiedFlags: | 902 usedNameIsQualifiedFlags: |
| 901 nameRelations.map((r) => r.isQualified).toList()); | 903 nameRelations.map((r) => r.isQualified).toList()); |
| 902 } | 904 } |
| 903 | 905 |
| 904 void defineName(String name, IndexNameKind kind, int offset) { | 906 void defineName(String name, IndexNameKind kind, int offset) { |
| 905 _StringInfo nameInfo = pkg._getStringInfo(name); | 907 _StringInfo nameInfo = pkg._getStringInfo(name); |
| 906 definedNames.add(new _DefinedNameInfo(nameInfo, kind, offset)); | 908 definedNames.add(new _DefinedNameInfo(nameInfo, kind, offset)); |
| 907 } | 909 } |
| 908 } | 910 } |
| OLD | NEW |