Mercurial > octave-nkf
diff src/pt-check.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-check.cc Wed Apr 16 14:19:59 2008 -0400 +++ b/src/pt-check.cc Wed Apr 16 15:09:56 2008 -0400 @@ -181,6 +181,15 @@ } void +tree_checker::visit_octave_user_script (octave_user_script& fcn) +{ + tree_statement_list *cmd_list = fcn.body (); + + if (cmd_list) + cmd_list->accept (*this); +} + +void tree_checker::visit_octave_user_function (octave_user_function& fcn) { tree_statement_list *cmd_list = fcn.body (); @@ -190,6 +199,15 @@ } void +tree_checker::visit_function_def (tree_function_def& fdef) +{ + octave_function *fcn = fdef.function (); + + if (fcn) + fcn->accept (*this); +} + +void tree_checker::visit_identifier (tree_identifier& /* id */) { }