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

Side by Side Diff: pkg/analyzer/lib/src/dart/ast/token.dart

Issue 1994243002: Dangling comment reference cleanup in analyzer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/ast.dart ('k') | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 analyzer.src.dart.ast.token; 5 library analyzer.src.dart.ast.token;
6 6
7 import 'package:analyzer/dart/ast/token.dart'; 7 import 'package:analyzer/dart/ast/token.dart';
8 import 'package:analyzer/src/generated/java_engine.dart'; 8 import 'package:analyzer/src/generated/java_engine.dart';
9 9
10 /** 10 /**
(...skipping 27 matching lines...) Expand all
38 class BeginTokenWithComment extends BeginToken implements TokenWithComment { 38 class BeginTokenWithComment extends BeginToken implements TokenWithComment {
39 /** 39 /**
40 * The first comment in the list of comments that precede this token. 40 * The first comment in the list of comments that precede this token.
41 */ 41 */
42 @override 42 @override
43 CommentToken _precedingComment; 43 CommentToken _precedingComment;
44 44
45 /** 45 /**
46 * Initialize a newly created token to have the given [type] at the given 46 * Initialize a newly created token to have the given [type] at the given
47 * [offset] and to be preceded by the comments reachable from the given 47 * [offset] and to be preceded by the comments reachable from the given
48 * [comment]. 48 * [_precedingComment].
49 */ 49 */
50 BeginTokenWithComment(TokenType type, int offset, this._precedingComment) 50 BeginTokenWithComment(TokenType type, int offset, this._precedingComment)
51 : super(type, offset) { 51 : super(type, offset) {
52 _setCommentParent(_precedingComment); 52 _setCommentParent(_precedingComment);
53 } 53 }
54 54
55 @override 55 @override
56 CommentToken get precedingComments => _precedingComment; 56 CommentToken get precedingComments => _precedingComment;
57 57
58 @override 58 @override
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 class KeywordTokenWithComment extends KeywordToken implements TokenWithComment { 167 class KeywordTokenWithComment extends KeywordToken implements TokenWithComment {
168 /** 168 /**
169 * The first comment in the list of comments that precede this token. 169 * The first comment in the list of comments that precede this token.
170 */ 170 */
171 @override 171 @override
172 CommentToken _precedingComment; 172 CommentToken _precedingComment;
173 173
174 /** 174 /**
175 * Initialize a newly created token to to represent the given [keyword] at the 175 * Initialize a newly created token to to represent the given [keyword] at the
176 * given [offset] and to be preceded by the comments reachable from the given 176 * given [offset] and to be preceded by the comments reachable from the given
177 * [comment]. 177 * [_precedingComment].
178 */ 178 */
179 KeywordTokenWithComment(Keyword keyword, int offset, this._precedingComment) 179 KeywordTokenWithComment(Keyword keyword, int offset, this._precedingComment)
180 : super(keyword, offset) { 180 : super(keyword, offset) {
181 _setCommentParent(_precedingComment); 181 _setCommentParent(_precedingComment);
182 } 182 }
183 183
184 @override 184 @override
185 CommentToken get precedingComments => _precedingComment; 185 CommentToken get precedingComments => _precedingComment;
186 186
187 void set precedingComments(CommentToken comment) { 187 void set precedingComments(CommentToken comment) {
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 CommentToken get precedingComments => _precedingComment; 564 CommentToken get precedingComments => _precedingComment;
565 565
566 void set precedingComments(CommentToken comment) { 566 void set precedingComments(CommentToken comment) {
567 _precedingComment = comment; 567 _precedingComment = comment;
568 _setCommentParent(_precedingComment); 568 _setCommentParent(_precedingComment);
569 } 569 }
570 570
571 @override 571 @override
572 Token copy() => new TokenWithComment(type, offset, precedingComments); 572 Token copy() => new TokenWithComment(type, offset, precedingComments);
573 } 573 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/ast.dart ('k') | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698