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

Side by Side Diff: utils/template/template.dart

Issue 11358145: Update utils to new library syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« no previous file with comments | « utils/pub/yaml/yaml.dart ('k') | utils/template/tool.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 #library('template'); 5 library template;
6 6
7 #import('dart:math', prefix: 'Math'); 7 import 'dart:math' as Math;
8 #import('../css/css.dart', prefix:'css'); 8 import '../css/css.dart' as css;
9 #import('../lib/file_system_memory.dart'); 9 import '../lib/file_system_memory.dart';
10 10
11 #source('tokenkind.dart'); 11 part 'tokenkind.dart';
12 #source('token.dart'); 12 part 'token.dart';
13 #source('source.dart'); 13 part 'source.dart';
14 #source('tokenizer_base.dart'); 14 part 'tokenizer_base.dart';
15 #source('tokenizer.dart'); 15 part 'tokenizer.dart';
16 #source('parser.dart'); 16 part 'parser.dart';
17 #source('codegen.dart'); 17 part 'codegen.dart';
18 #source('tree.dart'); 18 part 'tree.dart';
19 #source('htmltree.dart'); 19 part 'htmltree.dart';
20 #source('utils.dart'); 20 part 'utils.dart';
21 #source('temploptions.dart'); 21 part 'temploptions.dart';
22 #source('world.dart'); 22 part 'world.dart';
23 23
24 24
25 void initHtmlWorld([bool commandLine = true]) { 25 void initHtmlWorld([bool commandLine = true]) {
26 var fs = new MemoryFileSystem(); 26 var fs = new MemoryFileSystem();
27 // parseOptions([], fs); 27 // parseOptions([], fs);
28 initializeWorld(fs); 28 initializeWorld(fs);
29 29
30 // TODO(terry): Should be set by arguments. When run as a tool these aren't 30 // TODO(terry): Should be set by arguments. When run as a tool these aren't
31 // set when run internaly set these so we can compile CSS and catch any 31 // set when run internaly set these so we can compile CSS and catch any
32 // problems programmatically. 32 // problems programmatically.
33 // options.throwOnErrors = true; 33 // options.throwOnErrors = true;
34 // options.throwOnFatal = true; 34 // options.throwOnFatal = true;
35 // options.useColors = commandLine ? true : false; 35 // options.useColors = commandLine ? true : false;
36 } 36 }
37 37
38 // TODO(terry): Add obfuscation mapping file. 38 // TODO(terry): Add obfuscation mapping file.
39 List<Template> templateParseAndValidate(String template) { 39 List<Template> templateParseAndValidate(String template) {
40 Parser parser = new Parser(new SourceFile(SourceFile.IN_MEMORY_FILE, 40 Parser parser = new Parser(new SourceFile(SourceFile.IN_MEMORY_FILE,
41 template)); 41 template));
42 42
43 return parser.parse(); 43 return parser.parse();
44 // if (tree != null) { 44 // if (tree != null) {
45 // Validate.template(tree.selectors, world); 45 // Validate.template(tree.selectors, world);
46 // } 46 // }
47 } 47 }
OLDNEW
« no previous file with comments | « utils/pub/yaml/yaml.dart ('k') | utils/template/tool.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698