# HG changeset patch # User Petter T. # Date 1686773245 14400 # Node ID 6870df38af9c8cb7dbc91639d066f0054e32eba7 # Parent 61d014959a8b09159acf4116325ab707600409f1 new predicate to identify braindead short circuit parse tree elements * pt-binop.h (tree_binary_expression::is_braindead): New virtual function. (tree_braindead_shortcircuit_binary_expression::is_braindead): New function. diff -r 61d014959a8b -r 6870df38af9c libinterp/parse-tree/pt-binop.h --- a/libinterp/parse-tree/pt-binop.h Wed Jun 14 16:02:51 2023 -0400 +++ b/libinterp/parse-tree/pt-binop.h Wed Jun 14 16:07:25 2023 -0400 @@ -107,6 +107,7 @@ void matlab_style_short_circuit_warning (const char *op); + virtual bool is_braindead () const { return false; } protected: // The operands for the expression. @@ -143,6 +144,8 @@ octave_value evaluate (tree_evaluator&, int nargout = 1); using tree_binary_expression::evaluate_n; + + bool is_braindead () const { return true; } }; // Boolean expressions.