| 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 /// Null pattern implementation of the [CompilerOutput] interface. | 5 /// Null pattern implementation of the [CompilerOutput] interface. |
| 6 | 6 |
| 7 library compiler.null_api; | 7 library compiler.null_api; |
| 8 | 8 |
| 9 import 'dart:async'; |
| 10 |
| 9 import '../compiler_new.dart'; | 11 import '../compiler_new.dart'; |
| 10 import 'dart:async'; | |
| 11 | 12 |
| 12 /// Null pattern implementation of the [CompilerOutput] interface. | 13 /// Null pattern implementation of the [CompilerOutput] interface. |
| 13 class NullCompilerOutput implements CompilerOutput { | 14 class NullCompilerOutput implements CompilerOutput { |
| 14 const NullCompilerOutput(); | 15 const NullCompilerOutput(); |
| 15 | 16 |
| 16 @override | 17 @override |
| 17 EventSink<String> createEventSink(String name, String extension) { | 18 EventSink<String> createEventSink(String name, String extension) { |
| 18 return NullSink.outputProvider(name, extension); | 19 return NullSink.outputProvider(name, extension); |
| 19 } | 20 } |
| 20 } | 21 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 31 | 32 |
| 32 void close() {} | 33 void close() {} |
| 33 | 34 |
| 34 toString() => name; | 35 toString() => name; |
| 35 | 36 |
| 36 /// Convenience method for getting an [api.CompilerOutputProvider]. | 37 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 37 static NullSink outputProvider(String name, String extension) { | 38 static NullSink outputProvider(String name, String extension) { |
| 38 return new NullSink('$name.$extension'); | 39 return new NullSink('$name.$extension'); |
| 39 } | 40 } |
| 40 } | 41 } |
| OLD | NEW |