| OLD | NEW |
| 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/pathos/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() { |
| 15 var args = new Options().arguments; | 15 var args = new Options().arguments; |
| 16 if (args.length != 1) { | 16 if (args.length != 1) { |
| 17 print('Converts "/**"-style block doc comments in a directory '); | 17 print('Converts "/**"-style block doc comments in a directory '); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 | 85 |
| 86 if (line != null) buffer.write('$line\n'); | 86 if (line != null) buffer.write('$line\n'); |
| 87 } | 87 } |
| 88 | 88 |
| 89 return buffer.toString(); | 89 return buffer.toString(); |
| 90 } | 90 } |
| OLD | NEW |