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

Side by Side Diff: utils/tip/toss.dart

Issue 8889031: move tip to utils so it can be picked up in the SDK (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 | « utils/tip/tip.html ('k') | no next file » | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #import('../lib/node/node.dart'); 5 #import('../../frog/lib/node/node.dart');
6 #import('../file_system_node.dart'); 6 #import('../../frog/file_system_node.dart');
7 #import('../lang.dart'); 7 #import('../../frog/lang.dart');
8 8
9 String compileDart(String basename, String filename) { 9 String compileDart(String basename, String filename) {
10 final basedir = path.dirname(basename); 10 final basedir = path.dirname(basename);
11 final fullname = '$basedir/$filename'; 11 final fullname = '$basedir/$filename';
12 12
13 world.reset(); 13 world.reset();
14 options.dartScript = fullname; 14 options.dartScript = fullname;
15 if (world.compile()) { 15 if (world.compile()) {
16 return world.getGeneratedCode(); 16 return world.getGeneratedCode();
17 } else { 17 } else {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 res.end(dirToHtml(req.url, filename)); 100 res.end(dirToHtml(req.url, filename));
101 } 101 }
102 } 102 }
103 103
104 104
105 res.statusCode = 404; 105 res.statusCode = 404;
106 res.end(''); 106 res.end('');
107 }).listen(1337, "localhost"); 107 }).listen(1337, "localhost");
108 print('Server running at http://localhost:1337/'); 108 print('Server running at http://localhost:1337/');
109 } 109 }
OLDNEW
« no previous file with comments | « utils/tip/tip.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698