OLD | NEW |
---|---|
1 // Copyright (c) 2012, 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 compiler; | 5 library compiler; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'implementation/apiimpl.dart'; | 8 import 'implementation/apiimpl.dart'; |
9 | 9 |
10 // Unless explicitly allowed, passing [:null:] for any argument to the | 10 // Unless explicitly allowed, passing [:null:] for any argument to the |
11 // methods of library will result in an Error being thrown. | 11 // methods of library will result in an Error being thrown. |
12 | 12 |
13 /** | 13 /** |
14 * Returns a future that completes to the source corresponding to | 14 * Returns a future that completes to the source corresponding to [uri]. |
15 * [uri]. If an exception occurs, the future completes with this | 15 * If an exception occurs, the future completes with this exception. |
16 * exception. | 16 * |
17 * The source can be represented either as a [List<int>] of UTF-8 bytes or as | |
ahe
2013/10/16 14:26:04
I don't think you can say List<int> inside [].
lukas
2013/10/17 07:21:25
Done.
| |
18 * a [String]. It is recommended to return a UTF-8 encoded list of bytes because | |
ahe
2013/10/16 14:26:04
Break before "It is recommended" and add "The foll
lukas
2013/10/17 07:21:25
Done.
| |
19 * the scanner is more efficient in this case. | |
20 * | |
21 * In both cases, the data structure is expected to hold a zero element at the | |
22 * last position. If this is not the case, the entire data structure is copied | |
23 * before scanning. | |
17 */ | 24 */ |
18 typedef Future<String> CompilerInputProvider(Uri uri); | 25 typedef Future/*<String | List<int>>*/ CompilerInputProvider(Uri uri); |
19 | 26 |
20 /// Deprecated, please use [CompilerInputProvider] instead. | 27 /// Deprecated, please use [CompilerInputProvider] instead. |
21 typedef Future<String> ReadStringFromUri(Uri uri); | 28 typedef Future<String> ReadStringFromUri(Uri uri); |
22 | 29 |
23 /** | 30 /** |
24 * Returns an [EventSink] that will serve as compiler output for the given | 31 * Returns an [EventSink] that will serve as compiler output for the given |
25 * component. | 32 * component. |
26 * | 33 * |
27 * Components are identified by [name] and [extension]. By convention, | 34 * Components are identified by [name] and [extension]. By convention, |
28 * the empty string [:"":] will represent the main script | 35 * the empty string [:"":] will represent the main script |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 final String name; | 181 final String name; |
175 | 182 |
176 /** | 183 /** |
177 * This constructor is not private to support user-defined | 184 * This constructor is not private to support user-defined |
178 * diagnostic kinds. | 185 * diagnostic kinds. |
179 */ | 186 */ |
180 const Diagnostic(this.ordinal, this.name); | 187 const Diagnostic(this.ordinal, this.name); |
181 | 188 |
182 String toString() => name; | 189 String toString() => name; |
183 } | 190 } |
OLD | NEW |