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

Unified Diff: pkg/analyzer_experimental/bin/formatter.dart

Issue 23480055: Formatter sanity-checking (via token stream verification). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_experimental/bin/formatter.dart
===================================================================
--- pkg/analyzer_experimental/bin/formatter.dart (revision 27307)
+++ pkg/analyzer_experimental/bin/formatter.dart (working copy)
@@ -18,14 +18,14 @@
bool overwriteFileContents;
-void main() {
+main() {
var options = argParser.parse(new Options().arguments);
if (options['help']) {
_printUsage();
return;
}
overwriteFileContents = options['write'];
-
+
if (options.rest.isEmpty) {
_formatStdin(options);
} else {
@@ -51,10 +51,10 @@
}
}
-_formatDirectory(dir) =>
+_formatDirectory(dir) =>
dir.listSync().forEach((resource) => _formatResource(resource));
-void _formatFile(file) {
+_formatFile(file) {
if (_isDartFile(file)) {
try {
var buffer = new StringBuffer();
@@ -66,7 +66,7 @@
print(formatted);
}
} catch (e) {
- _log('Error formatting "${file.path}": $e');
+ _log('Unable to format "${file.path}": $e');
}
}
}

Powered by Google App Engine
This is Rietveld 408576698