| 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/standard_resolution_map.dart'; | 6 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; |
| 7 import 'package:analyzer/dart/ast/token.dart'; | 7 import 'package:analyzer/dart/ast/token.dart'; |
| 8 import 'package:analyzer/dart/ast/visitor.dart'; | 8 import 'package:analyzer/dart/ast/visitor.dart'; |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/dart/element/type.dart'; | 10 import 'package:analyzer/dart/element/type.dart'; |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 IndexRelationKind kind = element is ClassElement | 603 IndexRelationKind kind = element is ClassElement |
| 604 ? IndexRelationKind.IS_REFERENCED_BY | 604 ? IndexRelationKind.IS_REFERENCED_BY |
| 605 : IndexRelationKind.IS_INVOKED_BY; | 605 : IndexRelationKind.IS_INVOKED_BY; |
| 606 recordRelation(element, kind, name, isQualified); | 606 recordRelation(element, kind, name, isQualified); |
| 607 node.target?.accept(this); | 607 node.target?.accept(this); |
| 608 node.argumentList?.accept(this); | 608 node.argumentList?.accept(this); |
| 609 } | 609 } |
| 610 | 610 |
| 611 @override | 611 @override |
| 612 visitPartDirective(PartDirective node) { | 612 visitPartDirective(PartDirective node) { |
| 613 Element element = node.element; | 613 CompilationUnitElement element = node.element; |
| 614 recordUriReference(element, node); | 614 if (element?.source != null) { |
| 615 recordUriReference(element, node); |
| 616 } |
| 615 super.visitPartDirective(node); | 617 super.visitPartDirective(node); |
| 616 } | 618 } |
| 617 | 619 |
| 618 @override | 620 @override |
| 619 visitPostfixExpression(PostfixExpression node) { | 621 visitPostfixExpression(PostfixExpression node) { |
| 620 recordOperatorReference(node.operator, node.bestElement); | 622 recordOperatorReference(node.operator, node.bestElement); |
| 621 super.visitPostfixExpression(node); | 623 super.visitPostfixExpression(node); |
| 622 } | 624 } |
| 623 | 625 |
| 624 @override | 626 @override |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 final String value; | 805 final String value; |
| 804 | 806 |
| 805 /** | 807 /** |
| 806 * The unique id of the string. It is set after indexing of the whole | 808 * The unique id of the string. It is set after indexing of the whole |
| 807 * package is done and we are assembling the full package index. | 809 * package is done and we are assembling the full package index. |
| 808 */ | 810 */ |
| 809 int id; | 811 int id; |
| 810 | 812 |
| 811 _StringInfo(this.value); | 813 _StringInfo(this.value); |
| 812 } | 814 } |
| OLD | NEW |