changeset 8831:71742f45571e

pt-bp.cc: call accept for function and script commands
author John W. Eaton <jwe@octave.org>
date Fri, 20 Feb 2009 14:11:04 -0500
parents fa981a053064
children 9dddbad47122
files src/ChangeLog src/pt-bp.cc
diffstat 2 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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  <jwe@octave.org>
+
+	* 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  <highegg@gmail.com>
 
 	* ov-base-mat.cc (octave_base_matrix<MT>::do_index_op):
--- 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