diff libinterp/parse-tree/pt.h @ 26113:8a15f3bace49

move eval_string inside interpreter/evaluator class * tree_evaluator.h, tree_evaluator.cc (tree_evaluator::eval_string): New functions. * interpreter.h, interpreter.cc (interpreter::eval_string): New functions. Forward to evaluator eval_string functions. * parse.h, oct-parse.yy (eval_string): Deprecate and forward to interpreter eval_string functions. Change all uses. * pt.h, pt.cc (tree::meets_bp_condition): Accept reference to tree_evaluator as argument. Change all uses. (tree::is_breakpoint): Split into separate is_breakpoint and is_active_breakpoint functions. Change all uses.
author John W. Eaton <jwe@octave.org>
date Fri, 16 Nov 2018 13:16:50 -0500
parents 6652d3823428
children f23f27e78aa2 00f796120a6d
line wrap: on
line diff
--- a/libinterp/parse-tree/pt.h	Tue Dec 20 03:25:17 2016 +0000
+++ b/libinterp/parse-tree/pt.h	Fri Nov 16 13:16:50 2018 -0500
@@ -33,6 +33,7 @@
 
 namespace octave
 {
+  class tree_evaluator;
   class tree_walker;
 
   // Base class for the parse tree.
@@ -85,11 +86,16 @@
         }
     }
 
-    bool meets_bp_condition (void) const;
+    bool meets_bp_condition (tree_evaluator& tw) const;
 
-    bool is_breakpoint (bool check_active = false) const
+    bool is_breakpoint (void) const
     {
-      return m_bp_cond && (! check_active || meets_bp_condition ());
+      return m_bp_cond;
+    }
+
+    bool is_active_breakpoint (tree_evaluator& tw) const
+    {
+      return m_bp_cond && meets_bp_condition (tw);
     }
 
     // breakpoint condition, or "0" (i.e., "false") if no breakpoint.