Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined (octave_tree_except_h)
00024 #define octave_tree_except_h 1
00025
00026 class tree_statement_list;
00027
00028 class tree_walker;
00029
00030 #include "comment-list.h"
00031 #include "pt-cmd.h"
00032 #include "symtab.h"
00033
00034
00035
00036 class
00037 tree_try_catch_command : public tree_command
00038 {
00039 public:
00040
00041 tree_try_catch_command (int l = -1, int c = -1)
00042 : tree_command (l, c), try_code (0), catch_code (0), lead_comm (0),
00043 mid_comm (0), trail_comm (0) { }
00044
00045 tree_try_catch_command (tree_statement_list *tc, tree_statement_list *cc,
00046 octave_comment_list *cl = 0,
00047 octave_comment_list *cm = 0,
00048 octave_comment_list *ct = 0,
00049 int l = -1, int c = -1)
00050 : tree_command (l, c), try_code (tc), catch_code (cc),
00051 lead_comm (cl), mid_comm (cm), trail_comm (ct) { }
00052
00053 ~tree_try_catch_command (void);
00054
00055 tree_statement_list *body (void) { return try_code; }
00056
00057 tree_statement_list *cleanup (void) { return catch_code; }
00058
00059 octave_comment_list *leading_comment (void) { return lead_comm; }
00060
00061 octave_comment_list *middle_comment (void) { return mid_comm; }
00062
00063 octave_comment_list *trailing_comment (void) { return trail_comm; }
00064
00065 tree_command *dup (symbol_table::scope_id scope,
00066 symbol_table::context_id context) const;
00067
00068 void accept (tree_walker& tw);
00069
00070 private:
00071
00072
00073 tree_statement_list *try_code;
00074
00075
00076 tree_statement_list *catch_code;
00077
00078
00079 octave_comment_list *lead_comm;
00080
00081
00082 octave_comment_list *mid_comm;
00083
00084
00085 octave_comment_list *trail_comm;
00086
00087
00088
00089 tree_try_catch_command (const tree_try_catch_command&);
00090
00091 tree_try_catch_command& operator = (const tree_try_catch_command&);
00092 };
00093
00094
00095
00096 class
00097 tree_unwind_protect_command : public tree_command
00098 {
00099 public:
00100
00101 tree_unwind_protect_command (int l = -1, int c = -1)
00102 : tree_command (l, c), unwind_protect_code (0), cleanup_code (0),
00103 lead_comm (0), mid_comm (0), trail_comm (0) { }
00104
00105 tree_unwind_protect_command (tree_statement_list *tc,
00106 tree_statement_list *cc,
00107 octave_comment_list *cl = 0,
00108 octave_comment_list *cm = 0,
00109 octave_comment_list *ct = 0,
00110 int l = -1, int c = -1)
00111 : tree_command (l, c), unwind_protect_code (tc), cleanup_code (cc),
00112 lead_comm (cl), mid_comm (cm), trail_comm (ct) { }
00113
00114 ~tree_unwind_protect_command (void);
00115
00116 tree_statement_list *body (void) { return unwind_protect_code; }
00117
00118 tree_statement_list *cleanup (void) { return cleanup_code; }
00119
00120 octave_comment_list *leading_comment (void) { return lead_comm; }
00121
00122 octave_comment_list *middle_comment (void) { return mid_comm; }
00123
00124 octave_comment_list *trailing_comment (void) { return trail_comm; }
00125
00126 tree_command *dup (symbol_table::scope_id scope,
00127 symbol_table::context_id context) const;
00128
00129 void accept (tree_walker& tw);
00130
00131 private:
00132
00133
00134 tree_statement_list *unwind_protect_code;
00135
00136
00137
00138 tree_statement_list *cleanup_code;
00139
00140
00141 octave_comment_list *lead_comm;
00142
00143
00144 octave_comment_list *mid_comm;
00145
00146
00147 octave_comment_list *trail_comm;
00148
00149
00150
00151 tree_unwind_protect_command (const tree_unwind_protect_command&);
00152
00153 tree_unwind_protect_command& operator = (const tree_unwind_protect_command&);
00154 };
00155
00156 #endif