diff src/pt-loop.h @ 3484:8b1f46ac2b64

[project @ 2000-01-27 23:30:45 by jwe]
author jwe
date Thu, 27 Jan 2000 23:30:48 +0000
parents daa1ed1f5462
children e5d5848370c9
line wrap: on
line diff
--- a/src/pt-loop.h
+++ b/src/pt-loop.h
@@ -67,7 +67,7 @@
 
   void accept (tree_walker& tw);
 
-private:
+protected:
 
   // Expression to test.
   tree_expression *expr;
@@ -75,6 +75,8 @@
   // List of commands to execute.
   tree_statement_list *list;
 
+private:
+
   // No copying!
 
   tree_while_command (const tree_while_command&);
@@ -82,6 +84,74 @@
   tree_while_command& operator = (const tree_while_command&);
 };
 
+// Do-While.
+
+class
+tree_do_while_command : public tree_while_command
+{
+public:
+
+  tree_do_while_command (int l = -1, int c = -1)
+    : tree_while_command (l, c) { }
+
+  tree_do_while_command (tree_expression *e, int l = -1, int c = -1)
+    : tree_while_command (e, l, c) { }
+
+  tree_do_while_command (tree_expression *e, tree_statement_list *lst,
+		      int l = -1, int c = -1)
+    : tree_while_command (e, lst, l, c) { }
+
+  ~tree_do_while_command (void) { }
+
+  void eval (void);
+
+  void eval_error (void);
+
+  void accept (tree_walker& tw);
+
+private:
+
+  // No copying!
+
+  tree_do_while_command (const tree_do_while_command&);
+
+  tree_do_while_command& operator = (const tree_do_while_command&);
+};
+
+// Do-Until.
+
+class
+tree_do_until_command : public tree_while_command
+{
+public:
+
+  tree_do_until_command (int l = -1, int c = -1)
+    : tree_while_command (l, c) { }
+
+  tree_do_until_command (tree_expression *e, int l = -1, int c = -1)
+    : tree_while_command (e, l, c) { }
+
+  tree_do_until_command (tree_expression *e, tree_statement_list *lst,
+		      int l = -1, int c = -1)
+    : tree_while_command (e, lst, l, c) { }
+
+  ~tree_do_until_command (void) { }
+
+  void eval (void);
+
+  void eval_error (void);
+
+  void accept (tree_walker& tw);
+
+private:
+
+  // No copying!
+
+  tree_do_until_command (const tree_do_until_command&);
+
+  tree_do_until_command& operator = (const tree_do_until_command&);
+};
+
 // For.
 
 class