| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library dev_compiler.src.codegen.js_codegen; | 5 library dev_compiler.src.codegen.js_codegen; |
| 6 | 6 |
| 7 import 'dart:collection' show HashSet; | 7 import 'dart:collection' show HashSet; |
| 8 import 'dart:io' show Directory, File; | 8 import 'dart:io' show Directory, File; |
| 9 | 9 |
| 10 import 'package:analyzer/analyzer.dart' hide ConstantEvaluator; | 10 import 'package:analyzer/analyzer.dart' hide ConstantEvaluator; |
| (...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1647 } | 1647 } |
| 1648 | 1648 |
| 1649 @override | 1649 @override |
| 1650 visitInterpolationExpression(InterpolationExpression node) => | 1650 visitInterpolationExpression(InterpolationExpression node) => |
| 1651 _visit(node.expression); | 1651 _visit(node.expression); |
| 1652 | 1652 |
| 1653 @override | 1653 @override |
| 1654 visitBooleanLiteral(BooleanLiteral node) => js.boolean(node.value); | 1654 visitBooleanLiteral(BooleanLiteral node) => js.boolean(node.value); |
| 1655 | 1655 |
| 1656 @override | 1656 @override |
| 1657 JS.Statement visitDeclaration(Declaration node) => | |
| 1658 js.comment('Unimplemented ${node.runtimeType}: $node'); | |
| 1659 | |
| 1660 @override | |
| 1661 JS.Statement visitStatement(Statement node) => | |
| 1662 js.comment('Unimplemented ${node.runtimeType}: $node'); | |
| 1663 | |
| 1664 @override | |
| 1665 JS.Expression visitExpression(Expression node) => | 1657 JS.Expression visitExpression(Expression node) => |
| 1666 _unimplementedCall('Unimplemented ${node.runtimeType}: $node'); | 1658 _unimplementedCall('Unimplemented ${node.runtimeType}: $node'); |
| 1667 | 1659 |
| 1668 JS.Expression _unimplementedCall(String comment) { | 1660 JS.Expression _unimplementedCall(String comment) { |
| 1669 return js.call('dart.throw_(#)', [js.escapedString(comment)]); | 1661 return js.call('dart.throw_(#)', [js.escapedString(comment)]); |
| 1670 } | 1662 } |
| 1671 | 1663 |
| 1672 @override | 1664 @override |
| 1673 visitNode(AstNode node) { | 1665 visitNode(AstNode node) { |
| 1674 // TODO(jmesserly): verify this is unreachable. | 1666 // TODO(jmesserly): verify this is unreachable. |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2021 | 2013 |
| 2022 // TODO(jmesserly): in many cases marking the end will be unncessary. | 2014 // TODO(jmesserly): in many cases marking the end will be unncessary. |
| 2023 printer.mark(_location(node.end)); | 2015 printer.mark(_location(node.end)); |
| 2024 } | 2016 } |
| 2025 | 2017 |
| 2026 String _getIdentifier(AstNode node) { | 2018 String _getIdentifier(AstNode node) { |
| 2027 if (node is SimpleIdentifier) return node.name; | 2019 if (node is SimpleIdentifier) return node.name; |
| 2028 return null; | 2020 return null; |
| 2029 } | 2021 } |
| 2030 } | 2022 } |
| OLD | NEW |