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

Side by Side Diff: pkg/analyzer/lib/src/generated/incremental_resolver.dart

Issue 768233002: Extract DocumentationCommentToken with field. (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 unified diff | Download patch | Annotate | Revision Log
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 engine.incremental_resolver; 5 library engine.incremental_resolver;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' as math; 8 import 'dart:math' as math;
9 9
10 import 'package:analyzer/src/generated/error_verifier.dart'; 10 import 'package:analyzer/src/generated/error_verifier.dart';
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 return token; 1074 return token;
1075 } 1075 }
1076 1076
1077 void _shiftTokens(Token token) { 1077 void _shiftTokens(Token token) {
1078 while (token != null) { 1078 while (token != null) {
1079 if (token.offset > _updateOffset) { 1079 if (token.offset > _updateOffset) {
1080 token.offset += _updateDelta; 1080 token.offset += _updateDelta;
1081 } 1081 }
1082 // comments 1082 // comments
1083 _shiftTokens(token.precedingComments); 1083 _shiftTokens(token.precedingComments);
1084 if (token is CommentToken) { 1084 if (token is DocumentationCommentToken) {
1085 for (Token reference in token.references) { 1085 for (Token reference in token.references) {
1086 _shiftTokens(reference); 1086 _shiftTokens(reference);
1087 } 1087 }
1088 } 1088 }
1089 // next 1089 // next
1090 if (token.type == TokenType.EOF) { 1090 if (token.type == TokenType.EOF) {
1091 break; 1091 break;
1092 } 1092 }
1093 token = token.next; 1093 token = token.next;
1094 } 1094 }
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1544 } 1544 }
1545 } 1545 }
1546 1546
1547 1547
1548 class _TokenPair { 1548 class _TokenPair {
1549 final Token oldToken; 1549 final Token oldToken;
1550 final Token newToken; 1550 final Token newToken;
1551 final bool atComment; 1551 final bool atComment;
1552 _TokenPair(this.oldToken, this.newToken, [this.atComment = false]); 1552 _TokenPair(this.oldToken, this.newToken, [this.atComment = false]);
1553 } 1553 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/parser.dart » ('j') | pkg/analyzer/lib/src/generated/parser.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698