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

Side by Side Diff: tools/line_doc_comments.dart

Issue 51043004: Remove uses of Options from tools directory. Fix platform_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « tools/full-coverage.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 2
3 /// Converts block-style Doc comments in Dart code to line style. 3 /// Converts block-style Doc comments in Dart code to line style.
4 library line_doc_comments; 4 library line_doc_comments;
5 import 'dart:io'; 5 import 'dart:io';
6 6
7 import '../pkg/path/lib/path.dart' as path; 7 import '../pkg/path/lib/path.dart' as path;
8 8
9 final oneLineBlock = new RegExp(r'^(\s*)/\*\*\s?(.*)\*/\s*$'); 9 final oneLineBlock = new RegExp(r'^(\s*)/\*\*\s?(.*)\*/\s*$');
10 final startBlock = new RegExp(r'^(\s*)/\*\*(.*)$'); 10 final startBlock = new RegExp(r'^(\s*)/\*\*(.*)$');
11 final blockLine = new RegExp(r'^\s*\*\s?(.*)$'); 11 final blockLine = new RegExp(r'^\s*\*\s?(.*)$');
12 final endBlock = new RegExp(r'^\s*\*/\s*$'); 12 final endBlock = new RegExp(r'^\s*\*/\s*$');
13 13
14 main() { 14 main(List<String> args) {
15 var args = new Options().arguments;
16 if (args.length != 1) { 15 if (args.length != 1) {
17 print('Converts "/**"-style block doc comments in a directory '); 16 print('Converts "/**"-style block doc comments in a directory ');
18 print('containing Dart code to "///"-style line doc comments.'); 17 print('containing Dart code to "///"-style line doc comments.');
19 print(''); 18 print('');
20 print('Usage: line_doc_coments.dart <dir>'); 19 print('Usage: line_doc_coments.dart <dir>');
21 return; 20 return;
22 } 21 }
23 22
24 var dir = new Directory(args[0]); 23 var dir = new Directory(args[0]);
25 dir.list(recursive: true).listen( 24 dir.list(recursive: true).listen(
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 80 }
82 } 81 }
83 } 82 }
84 } 83 }
85 84
86 if (line != null) buffer.write('$line\n'); 85 if (line != null) buffer.write('$line\n');
87 } 86 }
88 87
89 return buffer.toString(); 88 return buffer.toString();
90 } 89 }
OLDNEW
« no previous file with comments | « tools/full-coverage.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698