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

Unified Diff: frog/file_system_memory.dart

Issue 8498020: Beginning of CSS parser using frog parsering infrastructure. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor cleanup. Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | frog/presubmit.py » ('j') | utils/css/parser.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/file_system_memory.dart
diff --git a/frog/file_system_memory.dart b/frog/file_system_memory.dart
new file mode 100644
index 0000000000000000000000000000000000000000..ca718def98e87d3e1dec53470f5fa926fc6a2c9c
--- /dev/null
+++ b/frog/file_system_memory.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#library('file_system_memory');
+
+#import('dart:dom');
+#import('file_system.dart');
+
+/**
+ * [FileSystem] implementation a memory buffer.
+ */
+class MemoryFileSystem implements FileSystem {
+ StringBuffer buffer;
+
+ MemoryFileSystem() : this.buffer = new StringBuffer();
+
+ void writeString(String outfile, String text) {
+ buffer.add(text);
+ }
+
+ String readAll(String filename) {
+ return buffer.toString();
+ }
+
+ bool fileExists(String filename) {
+ return true;
+ }
+}
« no previous file with comments | « no previous file | frog/presubmit.py » ('j') | utils/css/parser.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698