OLD | NEW |
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 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1259 } | 1259 } |
1260 } | 1260 } |
1261 bool visitCatch(Catch node) => node.body.accept(this); | 1261 bool visitCatch(Catch node) => node.body.accept(this); |
1262 bool visitSwitch(Switch node) => false; | 1262 bool visitSwitch(Switch node) => false; |
1263 bool visitCase(Case node) => false; | 1263 bool visitCase(Case node) => false; |
1264 bool visitDefault(Default node) => false; | 1264 bool visitDefault(Default node) => false; |
1265 bool visitFunctionDeclaration(FunctionDeclaration node) => false; | 1265 bool visitFunctionDeclaration(FunctionDeclaration node) => false; |
1266 bool visitLabeledStatement(LabeledStatement node) | 1266 bool visitLabeledStatement(LabeledStatement node) |
1267 => node.body.accept(this); | 1267 => node.body.accept(this); |
1268 bool visitLiteralStatement(LiteralStatement node) => true; | 1268 bool visitLiteralStatement(LiteralStatement node) => true; |
1269 bool visitClassDeclaration(ClassDeclaration) => false; | 1269 bool visitClassDeclaration(ClassDeclaration node) => false; |
1270 | 1270 |
1271 bool visitExpression(Expression node) => false; | 1271 bool visitExpression(Expression node) => false; |
1272 } | 1272 } |
1273 | 1273 |
1274 | 1274 |
1275 abstract class LocalNamer { | 1275 abstract class LocalNamer { |
1276 String getName(Identifier node); | 1276 String getName(Identifier node); |
1277 void enterScope(FunctionExpression node); | 1277 void enterScope(FunctionExpression node); |
1278 void leaveScope(); | 1278 void leaveScope(); |
1279 } | 1279 } |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1437 declare(node.name); | 1437 declare(node.name); |
1438 node.function.accept(this); | 1438 node.function.accept(this); |
1439 } | 1439 } |
1440 | 1440 |
1441 visitClassExpression(ClassExpression node) { | 1441 visitClassExpression(ClassExpression node) { |
1442 declare(node.name); | 1442 declare(node.name); |
1443 if (node.heritage != null) node.heritage.accept(this); | 1443 if (node.heritage != null) node.heritage.accept(this); |
1444 for (Method element in node.methods) element.accept(this); | 1444 for (Method element in node.methods) element.accept(this); |
1445 } | 1445 } |
1446 } | 1446 } |
OLD | NEW |