Mercurial > hg > octave-nkf
diff src/pt-pr-code.cc @ 7715:5b4d278ec828
parse scripts completely before executing
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 16 Apr 2008 15:09:56 -0400 |
parents | a1dbe9d80eee |
children | 73c4516fae10 |
line wrap: on
line diff
--- a/src/pt-pr-code.cc +++ b/src/pt-pr-code.cc @@ -284,6 +284,17 @@ } void +tree_print_code::visit_octave_user_script (octave_user_script& fcn) +{ + reset (); + + tree_statement_list *cmd_list = fcn.body (); + + if (cmd_list) + cmd_list->accept (*this); +} + +void tree_print_code::visit_octave_user_function (octave_user_function& fcn) { reset (); @@ -407,6 +418,17 @@ } void +tree_print_code::visit_function_def (tree_function_def& fdef) +{ + indent (); + + octave_function *fcn = fdef.function (); + + if (fcn) + fcn->accept (*this); +} + +void tree_print_code::visit_identifier (tree_identifier& id) { indent ();