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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/ast.dart

Issue 15675016: More fixes for java2dart and status files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_experimental/lib/src/generated/ast.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/ast.dart b/pkg/analyzer_experimental/lib/src/generated/ast.dart
index 82647d4e44302d304d583083bb9953f06b5df373..e242155612ef960b7cb6c71cb194194eb2c31161 100644
--- a/pkg/analyzer_experimental/lib/src/generated/ast.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/ast.dart
@@ -2775,6 +2775,7 @@ class CommentType implements Comparable<CommentType> {
CommentType(this.name, this.ordinal) {
}
int compareTo(CommentType other) => ordinal - other.ordinal;
+ int get hashCode => ordinal;
String toString() => name;
}
/**
@@ -12652,6 +12653,23 @@ class VariableDeclaration extends Declaration {
*/
VariableDeclaration({Comment comment, List<Annotation> metadata, SimpleIdentifier name, Token equals, Expression initializer}) : this.full(comment, metadata, name, equals, initializer);
accept(ASTVisitor visitor) => visitor.visitVariableDeclaration(this);
+
+ /**
+ * This overridden implementation of getDocumentationComment() looks in the grandparent node for
+ * dartdoc comments if no documentation is specifically available on the node.
+ */
+ Comment get documentationComment {
+ Comment comment = super.documentationComment;
+ if (comment == null) {
+ if (parent != null && parent.parent != null) {
+ ASTNode node = parent.parent;
+ if (node is AnnotatedNode) {
+ return ((node as AnnotatedNode)).documentationComment;
+ }
+ }
+ }
+ return comment;
+ }
VariableElement get element => _name != null ? (_name.element as VariableElement) : null;
Token get endToken {
if (_initializer != null) {

Powered by Google App Engine
This is Rietveld 408576698