# HG changeset patch # User John W. Eaton # Date 1235157064 18000 # Node ID 71742f45571ed96e0cc91b14c3647276c0a03994 # Parent fa981a0530644364cbddbabfae8d218100066c67 pt-bp.cc: call accept for function and script commands diff -r fa981a053064 -r 71742f45571e src/ChangeLog --- a/src/ChangeLog Fri Feb 20 12:24:03 2009 -0500 +++ b/src/ChangeLog Fri Feb 20 14:11:04 2009 -0500 @@ -1,3 +1,9 @@ +2009-02-20 John W. Eaton + + * pt-bp.cc (tree_breakpoint::visit_octave_user_script, + tree_breakpoint::visit_octave_user_function): + Don't panic. Call accept on command list if it exists. + 2009-02-20 Jaroslav Hajek * ov-base-mat.cc (octave_base_matrix::do_index_op): diff -r fa981a053064 -r 71742f45571e src/pt-bp.cc --- a/src/pt-bp.cc Fri Feb 20 12:24:03 2009 -0500 +++ b/src/pt-bp.cc Fri Feb 20 14:11:04 2009 -0500 @@ -160,15 +160,21 @@ } void -tree_breakpoint::visit_octave_user_script (octave_user_script&) +tree_breakpoint::visit_octave_user_script (octave_user_script& fcn) { - panic_impossible (); + tree_statement_list *cmd_list = fcn.body (); + + if (cmd_list) + cmd_list->accept (*this); } void -tree_breakpoint::visit_octave_user_function (octave_user_function&) +tree_breakpoint::visit_octave_user_function (octave_user_function& fcn) { - panic_impossible (); + tree_statement_list *cmd_list = fcn.body (); + + if (cmd_list) + cmd_list->accept (*this); } void