diff src/pt-pr-code.cc @ 3484:8b1f46ac2b64

[project @ 2000-01-27 23:30:45 by jwe]
author jwe
date Thu, 27 Jan 2000 23:30:48 +0000
parents 32dd5d5e8c8f
children e5d5848370c9
line wrap: on
line diff
--- a/src/pt-pr-code.cc	Wed Jan 26 23:37:11 2000 +0000
+++ b/src/pt-pr-code.cc	Thu Jan 27 23:30:48 2000 +0000
@@ -1101,6 +1101,66 @@
   os << "endwhile";
 }
 
+void
+tree_print_code::visit_do_while_command (tree_do_while_command& cmd)
+{
+  indent ();
+
+  os << "do";
+
+  newline ();
+
+  tree_statement_list *list = cmd.body ();
+
+  if (list)
+    {
+      increment_indent_level ();
+      list->accept (*this);
+      decrement_indent_level ();
+    }
+
+  indent ();
+
+  os << "while";
+
+  tree_expression *expr = cmd.condition ();
+
+  if (expr)
+    expr->accept (*this);
+
+  newline ();
+}
+
+void
+tree_print_code::visit_do_until_command (tree_do_until_command& cmd)
+{
+  indent ();
+
+  os << "do";
+
+  newline ();
+
+  tree_statement_list *list = cmd.body ();
+
+  if (list)
+    {
+      increment_indent_level ();
+      list->accept (*this);
+      decrement_indent_level ();
+    }
+
+  indent ();
+
+  os << "until";
+
+  tree_expression *expr = cmd.condition ();
+
+  if (expr)
+    expr->accept (*this);
+
+  newline ();
+}
+
 // Current indentation.
 int tree_print_code::curr_print_indent_level = 0;