Mercurial > hg > octave-nkf
diff src/pt-pr-code.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-pr-code.cc +++ b/src/pt-pr-code.cc @@ -150,7 +150,7 @@ } void -tree_print_code::visit_decl_command (tree_decl_command& cmd) +tree_print_code::do_decl_command (tree_decl_command& cmd) { indent (); @@ -163,6 +163,18 @@ } void +tree_print_code::visit_global_command (tree_global_command& cmd) +{ + do_decl_command (cmd); +} + +void +tree_print_code::visit_static_command (tree_static_command& cmd) +{ + do_decl_command (cmd); +} + +void tree_print_code::visit_decl_elt (tree_decl_elt& cmd) { tree_identifier *id = cmd.ident (); @@ -422,10 +434,12 @@ { indent (); - 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