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

Side by Side Diff: pkg/analysis_server/lib/src/services/correction/util.dart

Issue 708263002: Clean up references in comments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/generated/util.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 services.src.correction.util; 5 library services.src.correction.util;
6 6
7 import 'dart:math'; 7 import 'dart:math';
8 8
9 import 'package:analysis_server/src/protocol.dart' show SourceChange, 9 import 'package:analysis_server/src/protocol.dart' show SourceChange,
10 SourceEdit; 10 SourceEdit;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 Source fileSource = new NonExistingSource(path, UriKind.FILE_URI); 65 Source fileSource = new NonExistingSource(path, UriKind.FILE_URI);
66 Uri uri = context.sourceFactory.restoreUri(fileSource); 66 Uri uri = context.sourceFactory.restoreUri(fileSource);
67 if (uri == null) { 67 if (uri == null) {
68 return null; 68 return null;
69 } 69 }
70 return uri.toString(); 70 return uri.toString();
71 } 71 }
72 72
73 73
74 /** 74 /**
75 * TODO(scheglov) replace with nodes once there will be [CompilationUnit#getComm ents]. 75 * TODO(scheglov) replace with nodes once there will be [CompilationUnit.getComm ents].
76 * 76 *
77 * Returns [SourceRange]s of all comments in [unit]. 77 * Returns [SourceRange]s of all comments in [unit].
78 */ 78 */
79 List<SourceRange> getCommentRanges(CompilationUnit unit) { 79 List<SourceRange> getCommentRanges(CompilationUnit unit) {
80 List<SourceRange> ranges = <SourceRange>[]; 80 List<SourceRange> ranges = <SourceRange>[];
81 Token token = unit.beginToken; 81 Token token = unit.beginToken;
82 while (token != null && token.type != TokenType.EOF) { 82 while (token != null && token.type != TokenType.EOF) {
83 Token commentToken = token.precedingComments; 83 Token commentToken = token.precedingComments;
84 while (commentToken != null) { 84 while (commentToken != null) {
85 ranges.add(rangeToken(commentToken)); 85 ranges.add(rangeToken(commentToken));
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 1450
1451 @override 1451 @override
1452 Object visitExpression(Expression node) { 1452 Object visitExpression(Expression node) {
1453 if (node is BinaryExpression && node.operator.type == groupOperatorType) { 1453 if (node is BinaryExpression && node.operator.type == groupOperatorType) {
1454 return super.visitNode(node); 1454 return super.visitNode(node);
1455 } 1455 }
1456 operands.add(node); 1456 operands.add(node);
1457 return null; 1457 return null;
1458 } 1458 }
1459 } 1459 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/generated/util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698