Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1004)

Side by Side Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 2990873002: Add Member.documentationComment and use it to resynthesize documentation from Kernel. (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3947 matching lines...) Expand 10 before | Expand all | Expand 10 after
3958 return _kernel.name.name; 3958 return _kernel.name.name;
3959 } 3959 }
3960 if (serializedExecutable != null) { 3960 if (serializedExecutable != null) {
3961 return serializedExecutable.name; 3961 return serializedExecutable.name;
3962 } 3962 }
3963 return super.displayName; 3963 return super.displayName;
3964 } 3964 }
3965 3965
3966 @override 3966 @override
3967 String get documentationComment { 3967 String get documentationComment {
3968 if (_kernel != null) {
3969 return _kernel.documentationComment;
3970 }
3968 if (serializedExecutable != null) { 3971 if (serializedExecutable != null) {
3969 return serializedExecutable?.documentationComment?.text; 3972 return serializedExecutable?.documentationComment?.text;
3970 } 3973 }
3971 return super.documentationComment; 3974 return super.documentationComment;
3972 } 3975 }
3973 3976
3974 /** 3977 /**
3975 * Set whether this executable element is external. 3978 * Set whether this executable element is external.
3976 */ 3979 */
3977 void set external(bool isExternal) { 3980 void set external(bool isExternal) {
(...skipping 3571 matching lines...) Expand 10 before | Expand all | Expand 10 after
7549 @override 7552 @override
7550 int get codeOffset { 7553 int get codeOffset {
7551 if (_unlinkedVariable != null) { 7554 if (_unlinkedVariable != null) {
7552 return _unlinkedVariable.codeRange?.offset; 7555 return _unlinkedVariable.codeRange?.offset;
7553 } 7556 }
7554 return super.codeOffset; 7557 return super.codeOffset;
7555 } 7558 }
7556 7559
7557 @override 7560 @override
7558 String get documentationComment { 7561 String get documentationComment {
7562 if (_kernel != null) {
7563 return _kernel.documentationComment;
7564 }
7559 if (_unlinkedVariable != null) { 7565 if (_unlinkedVariable != null) {
7560 return _unlinkedVariable?.documentationComment?.text; 7566 return _unlinkedVariable?.documentationComment?.text;
7561 } 7567 }
7562 return super.documentationComment; 7568 return super.documentationComment;
7563 } 7569 }
7564 7570
7565 @override 7571 @override
7566 bool get hasImplicitType { 7572 bool get hasImplicitType {
7567 if (_unlinkedVariable != null) { 7573 if (_unlinkedVariable != null) {
7568 return _unlinkedVariable.type == null; 7574 return _unlinkedVariable.type == null;
(...skipping 2114 matching lines...) Expand 10 before | Expand all | Expand 10 after
9683 9689
9684 @override 9690 @override
9685 DartObject computeConstantValue() => null; 9691 DartObject computeConstantValue() => null;
9686 9692
9687 @override 9693 @override
9688 void visitChildren(ElementVisitor visitor) { 9694 void visitChildren(ElementVisitor visitor) {
9689 super.visitChildren(visitor); 9695 super.visitChildren(visitor);
9690 _initializer?.accept(visitor); 9696 _initializer?.accept(visitor);
9691 } 9697 }
9692 } 9698 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698