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

Unified Diff: lib/src/codegen/js_printer.dart

Issue 1524843002: JS: Format if statements with no else on a single line (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: rebased Created 5 years 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
« no previous file with comments | « lib/runtime/dart/typed_data.js ('k') | lib/src/js/printer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/js_printer.dart
diff --git a/lib/src/codegen/js_printer.dart b/lib/src/codegen/js_printer.dart
index 021678f2a59e5603865adcc7659222a26600f170..900f719e6ff14fba0c204e01f4f4f71e73512a77 100644
--- a/lib/src/codegen/js_printer.dart
+++ b/lib/src/codegen/js_printer.dart
@@ -34,6 +34,7 @@ String writeJsLibrary(JS.Program jsTree, String outputPath,
var opts = new JS.JavaScriptPrintingOptions(
allowKeywordsInProperties: true,
+ allowSingleLineIfStatements: true,
arrowFnBindThisWorkaround: arrowFnBindThisWorkaround);
var jsNamer = new TemporaryNamer(jsTree);
jsTree.accept(new JS.Printer(opts, context, localNamer: jsNamer));
« no previous file with comments | « lib/runtime/dart/typed_data.js ('k') | lib/src/js/printer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698