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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/Resolver.java

Issue 11312081: Issue 6251. Resolve and rename [id] references in documentation comments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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: compiler/java/com/google/dart/compiler/resolver/Resolver.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/Resolver.java b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
index a442e8c8c235be415842e34f69b49d244c28d5dd..e9c2e5b21c2ef06a2b5fd59449aa7764148367b7 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -20,6 +20,7 @@ import com.google.dart.compiler.ast.DartBreakStatement;
import com.google.dart.compiler.ast.DartCase;
import com.google.dart.compiler.ast.DartCatchBlock;
import com.google.dart.compiler.ast.DartClass;
+import com.google.dart.compiler.ast.DartComment;
import com.google.dart.compiler.ast.DartContinueStatement;
import com.google.dart.compiler.ast.DartDirective;
import com.google.dart.compiler.ast.DartDoWhileStatement;
@@ -407,6 +408,13 @@ public class Resolver {
}
});
}
+
+ {
+ DartComment comment = cls.getDartDoc();
+ if (comment != null) {
+ comment.accept(this);
+ }
+ }
context = previousContext;
currentHolder = previousHolder;
@@ -647,6 +655,13 @@ public class Resolver {
onError(parameter, ResolverErrorCode.DUPLICATE_INITIALIZATION, parameter.getName());
}
}
+
+ {
+ DartComment comment = node.getDartDoc();
+ if (comment != null) {
+ comment.accept(this);
+ }
+ }
DartBlock body = functionNode.getBody();
boolean isInterface = false;
@@ -1184,6 +1199,7 @@ public class Resolver {
onError(x, ResolverErrorCode.CANNOT_BE_RESOLVED, name);
x.markResolutionAlreadyReportedThatTheMethodCouldNotBeFound();
}
+ } else if (x.getParent() instanceof DartComment) {
} else {
element = checkResolvedIdentifier(x, isQualifier, scope, name, element);
}
@@ -1207,7 +1223,7 @@ public class Resolver {
onError(x, ResolverErrorCode.USING_LOCAL_VARIABLE_BEFORE_DECLARATION, x);
}
- if (!isQualifier) {
+ if (!isQualifier && !(x.getParent() instanceof DartComment)) {
switch (ElementKind.of(element)) {
case FUNCTION_TYPE_ALIAS:
onError(x, ResolverErrorCode.CANNOT_USE_TYPE, name);

Powered by Google App Engine
This is Rietveld 408576698