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

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

Issue 764243003: Updated detached tokens of references in documentation comments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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/parser.dart
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index 9bd6454e9c3491b28ed661e10158a74ee2fd4e0e..905a732668ec75e243621b0f3e47a79764cfd0b3 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -5458,9 +5458,9 @@ class Parser {
* @param tokens the comment tokens representing the documentation comments to be parsed
* @return the comment references that were parsed
*/
- List<CommentReference> _parseCommentReferences(List<Token> tokens) {
+ List<CommentReference> _parseCommentReferences(List<CommentToken> tokens) {
List<CommentReference> references = new List<CommentReference>();
- for (Token token in tokens) {
+ for (CommentToken token in tokens) {
String comment = token.lexeme;
int length = comment.length;
List<List<int>> codeBlockRanges = _getCodeBlockRanges(comment);
@@ -5482,6 +5482,7 @@ class Parser {
nameOffset);
if (reference != null) {
references.add(reference);
+ token.references.add(reference.beginToken);
}
}
}
@@ -6016,8 +6017,8 @@ class Parser {
* @return the documentation comment that was parsed, or `null` if there was no comment
*/
Comment _parseDocumentationComment() {
- List<Token> commentTokens = new List<Token>();
- Token commentToken = _currentToken.precedingComments;
+ List<CommentToken> commentTokens = <CommentToken>[];
+ CommentToken commentToken = _currentToken.precedingComments;
while (commentToken != null) {
if (commentToken.type == TokenType.SINGLE_LINE_COMMENT) {
if (StringUtilities.startsWith3(

Powered by Google App Engine
This is Rietveld 408576698