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

Unified Diff: pkg/analyzer/lib/src/generated/incremental_resolver.dart

Issue 1581293002: Issue 25064. Incrementally resolve comments only if both are documentation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/lib/src/generated/incremental_resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
index b67b90552ca24c276c23451cc395685aaa95ec76..46a8efb51b3734ae7f8d5ad4eaf580b279885074 100644
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
@@ -597,12 +597,12 @@ class DeclarationMatcher extends RecursiveAstVisitor {
}
void _assertSameAnnotations(AnnotatedNode node, Element element) {
- List<Annotation> nodeAnnotaitons = node.metadata;
+ List<Annotation> nodeAnnotations = node.metadata;
List<ElementAnnotation> elementAnnotations = element.metadata;
- int length = nodeAnnotaitons.length;
+ int length = nodeAnnotations.length;
_assertEquals(elementAnnotations.length, length);
for (int i = 0; i < length; i++) {
- _assertSameAnnotation(nodeAnnotaitons[i], elementAnnotations[i]);
+ _assertSameAnnotation(nodeAnnotations[i], elementAnnotations[i]);
}
}
@@ -1555,8 +1555,7 @@ class PoorMansIncrementalResolver {
return true;
}
} catch (e, st) {
- logger.log(e);
- logger.log(st);
+ logger.logException(e, st);
logger.log('Failure: exception.');
skybrian 2016/01/14 02:39:13 Another suggestion: + // The incremental res
} finally {
logger.exit();
@@ -1733,7 +1732,7 @@ class PoorMansIncrementalResolver {
Token newComment = newToken.precedingComments;
if (_compareToken(oldComment, newComment, 0, true) != null) {
_TokenDifferenceKind diffKind = _TokenDifferenceKind.COMMENT;
- if (oldComment is DocumentationCommentToken ||
+ if (oldComment is DocumentationCommentToken &&
newComment is DocumentationCommentToken) {
diffKind = _TokenDifferenceKind.COMMENT_DOC;
}
@@ -1769,7 +1768,7 @@ class PoorMansIncrementalResolver {
Token newComment = newToken.precedingComments;
if (_compareToken(oldComment, newComment, delta, true) != null) {
_TokenDifferenceKind diffKind = _TokenDifferenceKind.COMMENT;
- if (oldComment is DocumentationCommentToken ||
+ if (oldComment is DocumentationCommentToken &&
newComment is DocumentationCommentToken) {
diffKind = _TokenDifferenceKind.COMMENT_DOC;
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_logger.dart ('k') | pkg/analyzer/test/generated/incremental_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698