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

Unified Diff: utils/css/tool.dart

Issue 9695048: Template parser (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Siggi's comments Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/css/tokenkind.dart ('k') | utils/css/tree.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/css/tool.dart
diff --git a/utils/css/tool.dart b/utils/css/tool.dart
index 22c22c8a04d282c435854390691f9b9a90d56f6a..cbc19b69fd7accb805b95c6f1a8bff9ed74ecc85 100644
--- a/utils/css/tool.dart
+++ b/utils/css/tool.dart
@@ -4,11 +4,11 @@
#library('csstool');
-#import('../../frog/lang.dart', prefix:'lang');
-#import('../../frog/file_system.dart');
-#import('../../frog/file_system_node.dart');
-#import('../../frog/lib/node/node.dart');
+#import('dart:io');
#import('css.dart');
+#import('../lib/file_system.dart');
+#import('../lib/file_system_vm.dart');
+
FileSystem files;
@@ -22,18 +22,18 @@ num time(callback()) {
}
printStats(num elapsed, [String filename = '']) {
- print('Parsed\033[32m ${filename}\033[0m in ${elapsed} msec.');
+ print('Parsed ${_GREEN_COLOR}${filename}${_NO_COLOR} in ${elapsed} msec.');
}
/**
* Run from the `utils/css` directory.
*/
void main() {
- // process.argv[0] == node and process.argv[1] == minfrog
- assert(process.argv.length == 4);
+ var optionArgs = new Options().arguments;
+ assert(optionArgs.length == 2);
- String sourceFullFn = process.argv[2];
- String outputFullFn = process.argv[3];
+ String sourceFullFn = optionArgs[0];
+ String outputFullFn = optionArgs[1];
String sourcePath;
String sourceFilename;
@@ -51,7 +51,7 @@ void main() {
initCssWorld();
- files = new NodeFileSystem();
+ files = new VMFileSystem();
if (!files.fileExists(sourceFullFn)) {
// Display colored error message if file is missing.
print("\033[31mCSS source file missing - ${sourceFullFn}\033[0m");
@@ -62,7 +62,7 @@ void main() {
final elapsed = time(() {
Parser parser = new Parser(
- new lang.SourceFile(sourceFullFn, source), 0, files, sourcePath);
+ new SourceFile(sourceFullFn, source), 0, files, sourcePath);
stylesheet = parser.parse();
});
« no previous file with comments | « utils/css/tokenkind.dart ('k') | utils/css/tree.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698