| 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 /// Common logic needed to provide a Dart SDK to the analyzer's resolver. This | 5 /// Common logic needed to provide a Dart SDK to the analyzer's resolver. This |
| 6 /// includes logic to determine where the sdk is located in the filesystem, and | 6 /// includes logic to determine where the sdk is located in the filesystem, and |
| 7 /// definitions to provide mock sdks. | 7 /// definitions to provide mock sdks. |
| 8 library dev_compiler.src.dart_sdk; | 8 library dev_compiler.src.dart_sdk; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/engine.dart'; | 10 import 'package:analyzer/src/generated/engine.dart'; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 class Deprecated { | 138 class Deprecated { |
| 139 final String expires; | 139 final String expires; |
| 140 const Deprecated(this.expires); | 140 const Deprecated(this.expires); |
| 141 } | 141 } |
| 142 const Object deprecated = const Deprecated("next release"); | 142 const Object deprecated = const Deprecated("next release"); |
| 143 class _Override { const _Override(); } | 143 class _Override { const _Override(); } |
| 144 const Object override = const _Override(); | 144 const Object override = const _Override(); |
| 145 class _Proxy { const _Proxy(); } | 145 class _Proxy { const _Proxy(); } |
| 146 const Object proxy = const _Proxy(); | 146 const Object proxy = const _Proxy(); |
| 147 | 147 |
| 148 class Iterable<E> {} | 148 class Iterable<E> { |
| 149 fold(initialValue, combine(previousValue, E element)) {} |
| 150 Iterable map(f(E element)) {} |
| 151 } |
| 149 class List<E> implements Iterable<E> { | 152 class List<E> implements Iterable<E> { |
| 150 List([int length]); | 153 List([int length]); |
| 151 List.filled(int length, E fill); | 154 List.filled(int length, E fill); |
| 152 } | 155 } |
| 153 class Map<K, V> { | 156 class Map<K, V> { |
| 154 Iterable<K> get keys {} | 157 Iterable<K> get keys {} |
| 155 } | 158 } |
| 156 ''', | 159 ''', |
| 157 'dart:async': ''' | 160 'dart:async': ''' |
| 158 class Future<T> { | 161 class Future<T> { |
| 159 Future(computation()) {} | 162 Future(computation()) {} |
| 160 Future.value(T t) {} | 163 Future.value(T t) {} |
| 161 Future then(callback) {} | 164 Future then(onValue(T value)) {} |
| 165 static Future<List> wait(Iterable<Future> futures) {} |
| 162 } | 166 } |
| 163 class Stream<T> {} | 167 class Stream<T> {} |
| 164 ''', | 168 ''', |
| 165 'dart:html': ''' | 169 'dart:html': ''' |
| 166 library dart.html; | 170 library dart.html; |
| 167 class HtmlElement {} | 171 class HtmlElement {} |
| 168 ''', | 172 ''', |
| 169 'dart:math': ''' | 173 'dart:math': ''' |
| 170 library dart.math; | 174 library dart.math; |
| 171 class Random { | 175 class Random { |
| 172 bool nextBool() {} | 176 bool nextBool() {} |
| 173 } | 177 } |
| 174 num min(num x, num y) {} | 178 num min(num x, num y) {} |
| 175 num max(num x, num y) {} | 179 num max(num x, num y) {} |
| 176 ''', | 180 ''', |
| 177 }; | 181 }; |
| OLD | NEW |