Mercurial > hg > octave-nkf
comparison src/pt-stmt.h @ 7736:a059b5679fbb
implement dbstack
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 25 Apr 2008 15:11:03 -0400 |
parents | 2dee19385d32 |
children | 71f068b22fcc |
comparison
equal
deleted
inserted
replaced
7735:6848970153ba | 7736:a059b5679fbb |
---|---|
69 | 69 |
70 bool print_result (void) { return print_flag; } | 70 bool print_result (void) { return print_flag; } |
71 | 71 |
72 tree_command *command (void) { return cmd; } | 72 tree_command *command (void) { return cmd; } |
73 | 73 |
74 octave_value_list eval (bool silent, int nargout, bool in_function_body); | 74 octave_value_list eval (bool silent, int nargout, |
75 bool in_function_or_script_body); | |
75 | 76 |
76 tree_expression *expression (void) { return expr; } | 77 tree_expression *expression (void) { return expr; } |
77 | 78 |
78 octave_comment_list *comment_text (void) { return comm; } | 79 octave_comment_list *comment_text (void) { return comm; } |
79 | 80 |
117 tree_statement_list : public octave_base_list<tree_statement *> | 118 tree_statement_list : public octave_base_list<tree_statement *> |
118 { | 119 { |
119 public: | 120 public: |
120 | 121 |
121 tree_statement_list (void) | 122 tree_statement_list (void) |
122 : function_body (false) { } | 123 : function_body (false), script_body (false) { } |
123 | 124 |
124 tree_statement_list (tree_statement *s) | 125 tree_statement_list (tree_statement *s) |
125 : function_body (false) { append (s); } | 126 : function_body (false), script_body (false) { append (s); } |
126 | 127 |
127 ~tree_statement_list (void) | 128 ~tree_statement_list (void) |
128 { | 129 { |
129 while (! empty ()) | 130 while (! empty ()) |
130 { | 131 { |
133 erase (p); | 134 erase (p); |
134 } | 135 } |
135 } | 136 } |
136 | 137 |
137 void mark_as_function_body (void) { function_body = true; } | 138 void mark_as_function_body (void) { function_body = true; } |
139 | |
140 void mark_as_script_body (void) { script_body = true; } | |
138 | 141 |
139 octave_value_list eval (bool silent = false, int nargout = 0); | 142 octave_value_list eval (bool silent = false, int nargout = 0); |
140 | 143 |
141 int set_breakpoint (int line); | 144 int set_breakpoint (int line); |
142 | 145 |
151 private: | 154 private: |
152 | 155 |
153 // Does this list of statements make up the body of a function? | 156 // Does this list of statements make up the body of a function? |
154 bool function_body; | 157 bool function_body; |
155 | 158 |
159 // Does this list of statements make up the body of a script? | |
160 bool script_body; | |
161 | |
156 // No copying! | 162 // No copying! |
157 | 163 |
158 tree_statement_list (const tree_statement_list&); | 164 tree_statement_list (const tree_statement_list&); |
159 | 165 |
160 tree_statement_list& operator = (const tree_statement_list&); | 166 tree_statement_list& operator = (const tree_statement_list&); |