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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart

Issue 25657008: Only have one method for generating a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Change name of writeOn to make it absolutely clear that it shouldn't be used in normal situations. Created 7 years, 2 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
Index: dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart b/dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart
index a49ea1a15cce0d433f6a1ce516d49b00cf902078..626de961c7128f23658428ea8cf97aa52f44a2bc 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_emitter/class_builder.dart
@@ -21,4 +21,15 @@ class ClassBuilder {
jsAst.Expression toObjectInitializer() {
return new jsAst.ObjectInitializer(properties);
}
+
+ /// This method is temporary. Do not use it unless you're working on
+ /// transforming code to build jsAst.Nodes.
+ void writeOn_DO_NOT_USE(CodeBuffer buffer,
+ Compiler compiler,
+ String separatedBy) {
+ for (jsAst.Property property in properties) {
+ if (!buffer.isEmpty) buffer.write(separatedBy);
+ buffer.write(jsAst.prettyPrint(property, compiler));
+ }
+ }
}

Powered by Google App Engine
This is Rietveld 408576698