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

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

Issue 2081603002: When copying TokenWithComment, use copy of its comments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | pkg/analyzer/test/generated/utilities_test.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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 562
563 @override 563 @override
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() =>
573 new TokenWithComment(type, offset, copyComments(precedingComments));
573 } 574 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/utilities_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698