| OLD | NEW |
| 1 // Copyright (c) 2011, 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 #library("total:dartc"); | 5 #library("total:dartc"); |
| 6 | 6 |
| 7 #import('dart:io'); |
| 8 |
| 7 /** | 9 /** |
| 8 * A simple wrapper around dartc. | 10 * A simple wrapper around dartc. |
| 9 * TODO: automatically determine the exec path to dartc | 11 * TODO: automatically determine the exec path to dartc |
| 10 * TODO: prevent ANSI colors from being exposed to the user | 12 * TODO: prevent ANSI colors from being exposed to the user |
| 11 */ | 13 */ |
| 12 class Dartc { | 14 class Dartc { |
| 13 final String DARTC_EXEC_PATH = '../../../out/Release_ia32/dartc'; | 15 final String DARTC_EXEC_PATH = '../../../out/Release_ia32/dartc'; |
| 14 | 16 |
| 15 String scriptName; | 17 String scriptName; |
| 16 String work = null; | 18 String work = null; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 compiler.stderr.dataHandler = () => _readAll(compiler.stderr, messages); | 59 compiler.stderr.dataHandler = () => _readAll(compiler.stderr, messages); |
| 58 } | 60 } |
| 59 } | 61 } |
| 60 | 62 |
| 61 void _readAll(InputStream input, StringBuffer output) { | 63 void _readAll(InputStream input, StringBuffer output) { |
| 62 while (input.available() != 0) { | 64 while (input.available() != 0) { |
| 63 output.add(new String.fromCharCodes(input.read())); | 65 output.add(new String.fromCharCodes(input.read())); |
| 64 } | 66 } |
| 65 } | 67 } |
| 66 | 68 |
| OLD | NEW |