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