Mercurial > hg > octave-lyh
comparison src/pt-check.cc @ 8658:73c4516fae10
New evaluator and debugger derived from tree-walker class
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 04 Feb 2009 00:47:53 -0500 |
parents | 5b4d278ec828 |
children | eb63fbe60fab |
comparison
equal
deleted
inserted
replaced
8657:102e05821f93 | 8658:73c4516fae10 |
---|---|
89 tree_checker::visit_continue_command (tree_continue_command&) | 89 tree_checker::visit_continue_command (tree_continue_command&) |
90 { | 90 { |
91 } | 91 } |
92 | 92 |
93 void | 93 void |
94 tree_checker::visit_decl_command (tree_decl_command& cmd) | 94 tree_checker::do_decl_command (tree_decl_command& cmd) |
95 { | 95 { |
96 tree_decl_init_list *init_list = cmd.initializer_list (); | 96 tree_decl_init_list *init_list = cmd.initializer_list (); |
97 | 97 |
98 if (init_list) | 98 if (init_list) |
99 init_list->accept (*this); | 99 init_list->accept (*this); |
100 } | |
101 | |
102 void | |
103 tree_checker::visit_global_command (tree_global_command& cmd) | |
104 { | |
105 do_decl_command (cmd); | |
106 } | |
107 | |
108 void | |
109 tree_checker::visit_static_command (tree_static_command& cmd) | |
110 { | |
111 do_decl_command (cmd); | |
100 } | 112 } |
101 | 113 |
102 void | 114 void |
103 tree_checker::visit_decl_elt (tree_decl_elt& cmd) | 115 tree_checker::visit_decl_elt (tree_decl_elt& cmd) |
104 { | 116 { |
199 } | 211 } |
200 | 212 |
201 void | 213 void |
202 tree_checker::visit_function_def (tree_function_def& fdef) | 214 tree_checker::visit_function_def (tree_function_def& fdef) |
203 { | 215 { |
204 octave_function *fcn = fdef.function (); | 216 octave_value fcn = fdef.function (); |
205 | 217 |
206 if (fcn) | 218 octave_function *f = fcn.function_value (); |
207 fcn->accept (*this); | 219 |
220 if (f) | |
221 f->accept (*this); | |
208 } | 222 } |
209 | 223 |
210 void | 224 void |
211 tree_checker::visit_identifier (tree_identifier& /* id */) | 225 tree_checker::visit_identifier (tree_identifier& /* id */) |
212 { | 226 { |