OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 library kernel.core_types; | 4 library kernel.core_types; |
5 | 5 |
6 import 'ast.dart'; | 6 import 'ast.dart'; |
7 import 'library_index.dart'; | 7 import 'library_index.dart'; |
8 | 8 |
9 /// Provides access to the classes and libraries in the core libraries. | 9 /// Provides access to the classes and libraries in the core libraries. |
10 class CoreTypes extends LibraryIndex { | 10 class CoreTypes extends LibraryIndex { |
11 Class objectClass; | 11 Class objectClass; |
12 Class nullClass; | 12 Class nullClass; |
13 Class boolClass; | 13 Class boolClass; |
14 Class intClass; | 14 Class intClass; |
15 Class numClass; | 15 Class numClass; |
16 Class doubleClass; | 16 Class doubleClass; |
17 Class stringClass; | 17 Class stringClass; |
18 Class listClass; | 18 Class listClass; |
19 Class mapClass; | 19 Class mapClass; |
20 Class iterableClass; | 20 Class iterableClass; |
21 Class iteratorClass; | 21 Class iteratorClass; |
22 Class futureClass; | 22 Class futureClass; |
| 23 Class futureOrClass; |
23 Class streamClass; | 24 Class streamClass; |
24 Class symbolClass; | 25 Class symbolClass; |
25 Class internalSymbolClass; | 26 Class internalSymbolClass; |
26 Class typeClass; | 27 Class typeClass; |
27 Class functionClass; | 28 Class functionClass; |
28 Class invocationClass; | 29 Class invocationClass; |
29 | 30 |
30 static final Map<String, List<String>> requiredClasses = { | 31 static final Map<String, List<String>> requiredClasses = { |
31 'dart:core': [ | 32 'dart:core': [ |
32 'Object', | 33 'Object', |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 stringClass = getClass('dart:core', 'String'); | 65 stringClass = getClass('dart:core', 'String'); |
65 listClass = getClass('dart:core', 'List'); | 66 listClass = getClass('dart:core', 'List'); |
66 mapClass = getClass('dart:core', 'Map'); | 67 mapClass = getClass('dart:core', 'Map'); |
67 iterableClass = getClass('dart:core', 'Iterable'); | 68 iterableClass = getClass('dart:core', 'Iterable'); |
68 iteratorClass = getClass('dart:core', 'Iterator'); | 69 iteratorClass = getClass('dart:core', 'Iterator'); |
69 symbolClass = getClass('dart:core', 'Symbol'); | 70 symbolClass = getClass('dart:core', 'Symbol'); |
70 typeClass = getClass('dart:core', 'Type'); | 71 typeClass = getClass('dart:core', 'Type'); |
71 functionClass = getClass('dart:core', 'Function'); | 72 functionClass = getClass('dart:core', 'Function'); |
72 invocationClass = getClass('dart:core', 'Invocation'); | 73 invocationClass = getClass('dart:core', 'Invocation'); |
73 futureClass = getClass('dart:async', 'Future'); | 74 futureClass = getClass('dart:async', 'Future'); |
| 75 futureOrClass = getClass('dart:async', 'FutureOr'); |
74 streamClass = getClass('dart:async', 'Stream'); | 76 streamClass = getClass('dart:async', 'Stream'); |
75 internalSymbolClass = getClass('dart:_internal', 'Symbol'); | 77 internalSymbolClass = getClass('dart:_internal', 'Symbol'); |
76 } | 78 } |
77 } | 79 } |
OLD | NEW |