Mercurial > hg > octave-lyh
diff 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 |
line wrap: on
line diff
--- a/src/pt-check.cc +++ b/src/pt-check.cc @@ -91,7 +91,7 @@ } void -tree_checker::visit_decl_command (tree_decl_command& cmd) +tree_checker::do_decl_command (tree_decl_command& cmd) { tree_decl_init_list *init_list = cmd.initializer_list (); @@ -100,6 +100,18 @@ } void +tree_checker::visit_global_command (tree_global_command& cmd) +{ + do_decl_command (cmd); +} + +void +tree_checker::visit_static_command (tree_static_command& cmd) +{ + do_decl_command (cmd); +} + +void tree_checker::visit_decl_elt (tree_decl_elt& cmd) { tree_identifier *id = cmd.ident (); @@ -201,10 +213,12 @@ void tree_checker::visit_function_def (tree_function_def& fdef) { - octave_function *fcn = fdef.function (); + octave_value fcn = fdef.function (); - if (fcn) - fcn->accept (*this); + octave_function *f = fcn.function_value (); + + if (f) + f->accept (*this); } void