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

Unified Diff: pkg/kernel/lib/text/ast_to_text.dart

Issue 2531873002: Add --verify-ir flag to dartk and test.py. (Closed)
Patch Set: Minor fixes Created 4 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 | « pkg/kernel/lib/checks.dart ('k') | pkg/kernel/lib/transformations/flags.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/text/ast_to_text.dart
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index 9e9a093bb2b206a8b5415e8bc8ccc4974eafb88d..18be9de8860b332563538e31d135145a2867ce16 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -92,6 +92,12 @@ String debugNodeToString(Node node) {
return '$buffer';
}
+String programToString(Program node) {
+ StringBuffer buffer = new StringBuffer();
+ new Printer(buffer, syntheticNames: new NameSystem()).writeProgramFile(node);
+ return '$buffer';
+}
+
class NameSystem {
final Namer<VariableDeclaration> variables =
new Namer<VariableDeclaration>('#t');
« no previous file with comments | « pkg/kernel/lib/checks.dart ('k') | pkg/kernel/lib/transformations/flags.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698