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

Side by Side Diff: tools/testing/legpad/legpad.dart

Issue 10908239: Fix dart/tools directory to remove @'raw string' and foo.dynamic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix merge conflicts 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 | « tools/testing/dart/test_suite.dart ('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) 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 #import("dart:html", prefix:"html"); 5 #import("dart:html", prefix:"html");
6 #import('../../../lib/compiler/compiler.dart', prefix: "compiler_lib"); 6 #import('../../../lib/compiler/compiler.dart', prefix: "compiler_lib");
7 #import('../../../lib/uri/uri.dart', prefix:"uri_lib"); 7 #import('../../../lib/uri/uri.dart', prefix:"uri_lib");
8 8
9 /** 9 /**
10 * This is the entrypoint for a version of the leg compiler that 10 * This is the entrypoint for a version of the leg compiler that
11 * runs in the browser. 11 * runs in the browser.
12 * 12 *
13 * Because this is running in the browser, we do not access 13 * Because this is running in the browser, we do not access
14 * the file system. Instead, we assume that all necessary files 14 * the file system. Instead, we assume that all necessary files
15 * have been placed in inert <script> elements somewhere on the html page. 15 * have been placed in inert <script> elements somewhere on the html page.
16 * 16 *
17 * (See legpad.py for more details on how the html page is constructed.) 17 * (See legpad.py for more details on how the html page is constructed.)
18 */ 18 */
19 void main() { 19 void main() {
20 new Legpad().run(); 20 new Legpad().run();
21 } 21 }
22 22
23 class Legpad { 23 class Legpad {
24 // id of script element containing name of the main dart file 24 // id of script element containing name of the main dart file
25 // to compile 25 // to compile
26 static final String MAIN_ID = "main_id"; 26 static const String MAIN_ID = "main_id";
27 27
28 Legpad() : warnings = new StringBuffer(); 28 Legpad() : warnings = new StringBuffer();
29 29
30 // accumulates diagnostic messages emitted by the leg compiler 30 // accumulates diagnostic messages emitted by the leg compiler
31 StringBuffer warnings; 31 StringBuffer warnings;
32 32
33 // the generated javascript 33 // the generated javascript
34 String output; 34 String output;
35 35
36 String readAll(String filename) { 36 String readAll(String filename) {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 return element.text.trim(); 128 return element.text.trim();
129 } 129 }
130 130
131 // TODO(mattsh): should exist in standard lib somewhere 131 // TODO(mattsh): should exist in standard lib somewhere
132 static String htmlEscape(String text) { 132 static String htmlEscape(String text) {
133 return text.replaceAll('&', '&amp;').replaceAll( 133 return text.replaceAll('&', '&amp;').replaceAll(
134 '>', '&gt;').replaceAll('<', '&lt;'); 134 '>', '&gt;').replaceAll('<', '&lt;');
135 } 135 }
136 } 136 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_suite.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698