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

Side by Side Diff: lib/src/js/printer.dart

Issue 1328303002: fix implicit_scope_test and builtin_identifier_test (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: format Created 5 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 unified diff | Download patch
« no previous file with comments | « lib/src/js/nodes.dart ('k') | test/browser/language_tests.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of js_ast; 5 part of js_ast;
6 6
7 7
8 class JavaScriptPrintingOptions { 8 class JavaScriptPrintingOptions {
9 final bool shouldCompressOutput; 9 final bool shouldCompressOutput;
10 final bool minifyLocalVariables; 10 final bool minifyLocalVariables;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } else { 231 } else {
232 lineOut(); 232 lineOut();
233 } 233 }
234 indentMore(); 234 indentMore();
235 visit(body); 235 visit(body);
236 indentLess(); 236 indentLess();
237 return false; 237 return false;
238 } 238 }
239 239
240 void blockOutWithoutBraces(Node node) { 240 void blockOutWithoutBraces(Node node) {
241 if (node is Block) { 241 if (node is Block && !node.isScope) {
242 context.enterNode(node); 242 context.enterNode(node);
243 Block block = node; 243 Block block = node;
244 block.statements.forEach(blockOutWithoutBraces); 244 block.statements.forEach(blockOutWithoutBraces);
245 context.exitNode(node); 245 context.exitNode(node);
246 } else { 246 } else {
247 visit(node); 247 visit(node);
248 } 248 }
249 } 249 }
250 250
251 void blockOut(Block node, bool shouldIndent, bool needsNewline) { 251 void blockOut(Block node, bool shouldIndent, bool needsNewline) {
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 declare(node.name); 1497 declare(node.name);
1498 node.function.accept(this); 1498 node.function.accept(this);
1499 } 1499 }
1500 1500
1501 visitClassExpression(ClassExpression node) { 1501 visitClassExpression(ClassExpression node) {
1502 declare(node.name); 1502 declare(node.name);
1503 if (node.heritage != null) node.heritage.accept(this); 1503 if (node.heritage != null) node.heritage.accept(this);
1504 for (Method element in node.methods) element.accept(this); 1504 for (Method element in node.methods) element.accept(this);
1505 } 1505 }
1506 } 1506 }
OLDNEW
« no previous file with comments | « lib/src/js/nodes.dart ('k') | test/browser/language_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698