| 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 js; | 5 library js; |
| 6 | 6 |
| 7 import 'package:js_ast/js_ast.dart'; | 7 import 'package:js_ast/js_ast.dart'; |
| 8 | 8 |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../options.dart'; | 10 import '../options.dart'; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 class Dart2JSJavaScriptPrintingContext implements JavaScriptPrintingContext { | 58 class Dart2JSJavaScriptPrintingContext implements JavaScriptPrintingContext { |
| 59 final DumpInfoTask monitor; | 59 final DumpInfoTask monitor; |
| 60 final CodeBuffer outBuffer; | 60 final CodeBuffer outBuffer; |
| 61 final CodePositionListener codePositionListener; | 61 final CodePositionListener codePositionListener; |
| 62 | 62 |
| 63 Dart2JSJavaScriptPrintingContext( | 63 Dart2JSJavaScriptPrintingContext( |
| 64 this.monitor, this.outBuffer, this.codePositionListener); | 64 this.monitor, this.outBuffer, this.codePositionListener); |
| 65 | 65 |
| 66 @override | 66 @override |
| 67 void error(String message) { | 67 void error(String message) { |
| 68 throw new SpannableAssertionFailure(NO_LOCATION_SPANNABLE, message); | 68 failedAt(NO_LOCATION_SPANNABLE, message); |
| 69 } | 69 } |
| 70 | 70 |
| 71 @override | 71 @override |
| 72 void emit(String string) { | 72 void emit(String string) { |
| 73 outBuffer.add(string); | 73 outBuffer.add(string); |
| 74 } | 74 } |
| 75 | 75 |
| 76 @override | 76 @override |
| 77 void enterNode(Node node, int startPosition) { | 77 void enterNode(Node node, int startPosition) { |
| 78 codePositionListener.onStartPosition(node, startPosition); | 78 codePositionListener.onStartPosition(node, startPosition); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 } | 188 } |
| 189 if (node is PropertyAccess) { | 189 if (node is PropertyAccess) { |
| 190 PropertyAccess access = node; | 190 PropertyAccess access = node; |
| 191 if (access.receiver is InterpolatedExpression) { | 191 if (access.receiver is InterpolatedExpression) { |
| 192 InterpolatedExpression hole = access.receiver; | 192 InterpolatedExpression hole = access.receiver; |
| 193 return hole.isPositional && hole.nameOrPosition == 0; | 193 return hole.isPositional && hole.nameOrPosition == 0; |
| 194 } | 194 } |
| 195 } | 195 } |
| 196 return false; | 196 return false; |
| 197 } | 197 } |
| OLD | NEW |