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

Side by Side Diff: samples/leap/leap_leg.dart

Issue 10919146: Get rid of a lot of () for getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 months 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
« no previous file with comments | « samples/dartcombat/setup.dart ('k') | samples/leap/leap_script.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 compilerIsolate(port) { 5 compilerIsolate(port) {
6 Runner runner = new Runner(); 6 Runner runner = new Runner();
7 runner.init(); 7 runner.init();
8 8
9 port.receive((msg, replyTo) { 9 port.receive((msg, replyTo) {
10 replyTo.send(runner.update(msg)); 10 replyTo.send(runner.update(msg));
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 final bool throwOnError = false; 212 final bool throwOnError = false;
213 213
214 final libDir = "../.."; 214 final libDir = "../..";
215 215
216 LeapCompiler() : cache = new HttpRequestCache(), super() { 216 LeapCompiler() : cache = new HttpRequestCache(), super() {
217 tasks = [scanner, dietParser, parser, resolver, checker]; 217 tasks = [scanner, dietParser, parser, resolver, checker];
218 } 218 }
219 219
220 void log(message) { print(message); } 220 void log(message) { print(message); }
221 221
222 String get legDirectory() => libDir; 222 String get legDirectory => libDir;
223 223
224 LibraryElement scanBuiltinLibrary(String path) { 224 LibraryElement scanBuiltinLibrary(String path) {
225 Uri base = new Uri.fromString(html.window.location.toString()); 225 Uri base = new Uri.fromString(html.window.location.toString());
226 Uri libraryRoot = base.resolve(libDir); 226 Uri libraryRoot = base.resolve(libDir);
227 Uri resolved = libraryRoot.resolve(DART2JS_LIBRARY_MAP[path]); 227 Uri resolved = libraryRoot.resolve(DART2JS_LIBRARY_MAP[path]);
228 LibraryElement library = scanner.loadLibrary(resolved, null); 228 LibraryElement library = scanner.loadLibrary(resolved, null);
229 return library; 229 return library;
230 } 230 }
231 231
232 currentScript() { 232 currentScript() {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 mainApp = new LibraryElement(script); 278 mainApp = new LibraryElement(script);
279 279
280 universe.libraries.remove(script.uri.toString()); 280 universe.libraries.remove(script.uri.toString());
281 Element element; 281 Element element;
282 withCurrentElement(mainApp, () { 282 withCurrentElement(mainApp, () {
283 scanner.scan(mainApp); 283 scanner.scan(mainApp);
284 }); 284 });
285 return mainApp; 285 return mainApp;
286 } 286 }
287 } 287 }
OLDNEW
« no previous file with comments | « samples/dartcombat/setup.dart ('k') | samples/leap/leap_script.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698