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

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

Issue 2617973002: Print <<NULL>> instead of crashing. (Closed)
Patch Set: Change <<NULL>> to <Null>. Created 3 years, 11 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 | « no previous file | no next file » | 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 67152054b4815e247d9c792224d8dec5dd8df6d7..7ad0c8ab1e2b0a3bd95bf0c31ada3cfb344e0ab3 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -393,7 +393,11 @@ class Printer extends Visitor<Null> {
}
void writeNode(Node node) {
- node.accept(this);
+ if (node == null) {
+ writeSymbol("<Null>");
+ } else {
+ node.accept(this);
+ }
}
void writeOptionalNode(Node node) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698