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

Unified Diff: lib/css.dart

Issue 998843003: pkg/csslib: formatting (Closed) Base URL: https://github.com/dart-lang/csslib@master
Patch Set: Created 5 years, 9 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: lib/css.dart
diff --git a/lib/css.dart b/lib/css.dart
index 73400bc2ab0c1ea39245a90b15323c32db273230..590e8351c3130553368462f5a48a4938e8026fc2 100644
--- a/lib/css.dart
+++ b/lib/css.dart
@@ -39,16 +39,16 @@ void _compile(String inputPath, bool verbose) {
var file = new SourceFile(contents, url: path.toUri(inputPath));
// Parse the CSS.
- var tree = _time('Parse $filename',
- () => new Parser(file, contents).parse(), verbose);
+ var tree = _time(
+ 'Parse $filename', () => new Parser(file, contents).parse(), verbose);
- _time('Analyzer $filename',
- () => new Analyzer([tree], messages), verbose).run();
+ _time('Analyzer $filename', () => new Analyzer([tree], messages), verbose)
+ .run();
// Emit the processed CSS.
var emitter = new CssPrinter();
- _time('Codegen $filename',
- () => emitter.visitTree(tree, pretty: true), verbose);
+ _time('Codegen $filename', () => emitter.visitTree(tree, pretty: true),
+ verbose);
// Write the contents to a file.
var outPath = path.join(path.dirname(inputPath), '_$filename');
@@ -76,6 +76,8 @@ void _printMessage(String message, int duration) {
buf.write(' -- ');
if (duration < 10) buf.write(' ');
if (duration < 100) buf.write(' ');
- buf..write(duration)..write(' ms');
+ buf
+ ..write(duration)
Jennifer Messerly 2015/03/19 20:25:30 i usually just get rid of cascades when this happe
+ ..write(' ms');
print(buf.toString());
}

Powered by Google App Engine
This is Rietveld 408576698