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

Unified Diff: pkg/js_ast/lib/src/printer.dart

Issue 2812393003: dart2js: Capture typedef arguments once (Closed)
Patch Set: comment Created 3 years, 8 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 | « pkg/js_ast/lib/src/nodes.dart ('k') | tests/compiler/dart2js_extra/28749_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/js_ast/lib/src/printer.dart
diff --git a/pkg/js_ast/lib/src/printer.dart b/pkg/js_ast/lib/src/printer.dart
index d4b09377f16e916c9755e5e2019bb694c7982f05..041b2dc5b8b708e474ba2babe0156a4595390757 100644
--- a/pkg/js_ast/lib/src/printer.dart
+++ b/pkg/js_ast/lib/src/printer.dart
@@ -61,6 +61,15 @@ class SimpleJavaScriptPrintingContext extends JavaScriptPrintingContext {
String getText() => buffer.toString();
}
+String DebugPrint(Node node) {
+ JavaScriptPrintingOptions options = new JavaScriptPrintingOptions();
+ SimpleJavaScriptPrintingContext context =
+ new SimpleJavaScriptPrintingContext();
+ Printer printer = new Printer(options, context);
+ printer.visit(node);
+ return context.getText();
+}
+
class Printer implements NodeVisitor {
final JavaScriptPrintingOptions options;
final JavaScriptPrintingContext context;
« no previous file with comments | « pkg/js_ast/lib/src/nodes.dart ('k') | tests/compiler/dart2js_extra/28749_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698