|
| 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 |
| 3 | +// BSD-style license that can be found in the LICENSE file. |
| 4 | + |
| 5 | +library dart.core; |
| 6 | + |
| 7 | +external bool identical(Object a, Object b); |
| 8 | + |
| 9 | +void print(Object object) {} |
| 10 | + |
| 11 | +class bool extends Object {} |
| 12 | + |
| 13 | +abstract class Comparable<T> { |
| 14 | + int compareTo(T other); |
| 15 | +} |
| 16 | + |
| 17 | +class DateTime extends Object {} |
| 18 | + |
| 19 | +class double extends num {} |
| 20 | + |
| 21 | +class Function {} |
| 22 | + |
| 23 | +abstract class int extends num { |
| 24 | + bool get isEven => false; |
| 25 | + int operator -(); |
| 26 | + external static int parse(String source, |
| 27 | + {int radix, int onError(String source)}); |
| 28 | +} |
| 29 | + |
| 30 | +abstract class Iterable<E> { |
| 31 | + bool get isEmpty; |
| 32 | + Iterator<E> get iterator; |
| 33 | +} |
| 34 | + |
| 35 | +class Iterator<E> { |
| 36 | + E get current; |
| 37 | + bool moveNext(); |
| 38 | +} |
| 39 | + |
| 40 | +abstract class List<E> implements Iterable<E> { |
| 41 | + Iterator<E> get iterator => null; |
| 42 | + E operator [](int index); |
| 43 | + void operator []=(int index, E value); |
| 44 | + void add(E value); |
| 45 | + void clear(); |
| 46 | +} |
| 47 | + |
| 48 | +abstract class Map<K, V> extends Object { |
| 49 | + Iterable<K> get keys; |
| 50 | + bool containsKey(Object key); |
| 51 | +} |
| 52 | + |
| 53 | +class Null extends Object {} |
| 54 | + |
| 55 | +abstract class num implements Comparable<num> { |
| 56 | + num operator %(num other); |
| 57 | + num operator *(num other); |
| 58 | + num operator +(num other); |
| 59 | + num operator -(num other); |
| 60 | + num operator /(num other); |
| 61 | + bool operator <(num other); |
| 62 | + bool operator <=(num other); |
| 63 | + bool operator >(num other); |
| 64 | + bool operator >=(num other); |
| 65 | + num abs(); |
| 66 | + int round(); |
| 67 | + int toInt(); |
| 68 | +} |
| 69 | + |
| 70 | +class Object { |
| 71 | + int get hashCode => 0; |
| 72 | + bool operator ==(other) => identical(this, other); |
| 73 | + String toString() => 'a string'; |
| 74 | +} |
| 75 | + |
| 76 | +class StackTrace {} |
| 77 | + |
| 78 | +abstract class String implements Comparable<String> { |
| 79 | + external factory String.fromCharCodes(Iterable<int> charCodes, |
| 80 | + [int start = 0, int end]); |
| 81 | + List<int> get codeUnits; |
| 82 | + bool get isEmpty => false; |
| 83 | + bool get isNotEmpty => false; |
| 84 | + int get length => 0; |
| 85 | + String toUpperCase(); |
| 86 | +} |
| 87 | + |
| 88 | +class Symbol {} |
| 89 | + |
| 90 | +class Type {} |
| 91 | + |
| 92 | +class Uri { |
| 93 | + static List<int> parseIPv6Address(String host, [int start = 0, int end]) { |
| 94 | + int parseHex(int start, int end) { |
| 95 | + return 0; |
| 96 | + } |
| 97 | + return null; |
| 98 | + } |
| 99 | +} |
0 commit comments