Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 10942028: Support class and typedef literals as expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address Peter's comments. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 mock_compiler; 5 library mock_compiler;
6 6
7 import 'dart:uri'; 7 import 'dart:uri';
8 8
9 import '../../../lib/compiler/compiler.dart' as api; 9 import '../../../lib/compiler/compiler.dart' as api;
10 import '../../../lib/compiler/implementation/dart2jslib.dart' hide TreeElementMa pping; 10 import '../../../lib/compiler/implementation/dart2jslib.dart' hide TreeElementMa pping;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 hasNext(receiver) {}'''; 56 hasNext(receiver) {}''';
57 57
58 const String DEFAULT_CORELIB = r''' 58 const String DEFAULT_CORELIB = r'''
59 print(var obj) {} 59 print(var obj) {}
60 abstract class num {} 60 abstract class num {}
61 abstract class int extends num { } 61 abstract class int extends num { }
62 abstract class double extends num { } 62 abstract class double extends num { }
63 class bool {} 63 class bool {}
64 class String {} 64 class String {}
65 class Object {} 65 class Object {}
66 class Type {}
66 class Function {} 67 class Function {}
67 interface List default ListImplementation { List([length]);} 68 interface List default ListImplementation { List([length]);}
68 class ListImplementation { factory List([length]) => null; } 69 class ListImplementation { factory List([length]) => null; }
69 abstract class Map {} 70 abstract class Map {}
70 class Closure {} 71 class Closure {}
71 class Null {} 72 class Null {}
72 class Dynamic_ {} 73 class Dynamic_ {}
73 bool identical(Object a, Object b) {}'''; 74 bool identical(Object a, Object b) {}''';
74 75
75 class MockCompiler extends Compiler { 76 class MockCompiler extends Compiler {
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 operator []=(Node node, Element element) { 253 operator []=(Node node, Element element) {
253 map[node] = element; 254 map[node] = element;
254 } 255 }
255 256
256 operator [](Node node) => map[node]; 257 operator [](Node node) => map[node];
257 258
258 void remove(Node node) { 259 void remove(Node node) {
259 map.remove(node); 260 map.remove(node);
260 } 261 }
261 } 262 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698