comparison src/pt-eval.h @ 8669:33783e94fb16

line number fixes and other evaluator tweaks
author John W. Eaton <jwe@octave.org>
date Wed, 04 Feb 2009 13:28:06 -0500
parents 73c4516fae10
children 3c1762c7e787
comparison
equal deleted inserted replaced
8668:739b0aebf261 8669:33783e94fb16
39 { 39 {
40 public: 40 public:
41 41
42 typedef void (*decl_elt_init_fcn) (tree_decl_elt&); 42 typedef void (*decl_elt_init_fcn) (tree_decl_elt&);
43 43
44 tree_evaluator (bool in_function_or_script_body_arg = false) 44 tree_evaluator (void) { }
45 : in_function_or_script_body (in_function_or_script_body_arg) { }
46 45
47 ~tree_evaluator (void) { } 46 ~tree_evaluator (void) { }
48
49 void reset (void)
50 {
51 in_function_or_script_body = false;
52 }
53 47
54 void visit_anon_fcn_handle (tree_anon_fcn_handle&); 48 void visit_anon_fcn_handle (tree_anon_fcn_handle&);
55 49
56 void visit_argument_list (tree_argument_list&); 50 void visit_argument_list (tree_argument_list&);
57 51
150 // The number of the stack frame we are currently debugging. 144 // The number of the stack frame we are currently debugging.
151 static size_t current_frame; 145 static size_t current_frame;
152 146
153 static bool debug_mode; 147 static bool debug_mode;
154 148
149 // TRUE means we are evaluating a function or script body.
150 static bool in_fcn_or_script_body;
151
152 // TRUE means we are evaluating some kind of looping construct.
153 static bool in_loop_command;
154
155 private: 155 private:
156
157 bool in_function_or_script_body;
158 156
159 void do_decl_init_list (decl_elt_init_fcn fcn, 157 void do_decl_init_list (decl_elt_init_fcn fcn,
160 tree_decl_init_list *init_list); 158 tree_decl_init_list *init_list);
161 159
162 void do_breakpoint (tree_statement& stmt) const; 160 void do_breakpoint (tree_statement& stmt) const;