From fc4c9a73c9655a97635af88cf3ed8702120fb852 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Wed, 27 Jul 2022 16:50:08 +0200
Subject: [PATCH] Fix comment

[skip ci]
---
 src/ExprNode.cc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/ExprNode.cc b/src/ExprNode.cc
index 3acfc967..3159204b 100644
--- a/src/ExprNode.cc
+++ b/src/ExprNode.cc
@@ -4510,10 +4510,10 @@ BinaryOpNode::writeJsonOutput(ostream &output,
   close_parenthesis = false;
 
   /* Add parenthesis around right argument if:
-     - its precedence is lower than those of the current node
+     - its precedence is lower than that of the current node
      - it is a power operator and current operator is also a power operator
-     - it is a minus operator with same precedence than current operator
-     - it is a divide operator with same precedence than current operator */
+     - it has same precedence as current operator and current operator is
+       either a minus or a divide */
   auto barg2 = dynamic_cast<BinaryOpNode *>(arg2);
   if (int arg2_prec = arg2->precedenceJson(temporary_terms); arg2_prec < prec
       || (op_code == BinaryOpcode::power && barg2 && barg2->op_code == BinaryOpcode::power)
@@ -4723,10 +4723,10 @@ BinaryOpNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
   else
     {
       /* Add parenthesis around right argument if:
-         - its precedence is lower than those of the current node
+         - its precedence is lower than that of the current node
          - it is a power operator and current operator is also a power operator
-         - it is a minus operator with same precedence than current operator
-         - it is a divide operator with same precedence than current operator */
+         - it has same precedence as current operator and current operator is
+           either a minus or a divide */
       auto barg2 = dynamic_cast<BinaryOpNode *>(arg2);
       if (int arg2_prec = arg2->precedence(output_type, temporary_terms); arg2_prec < prec
           || (op_code == BinaryOpcode::power && barg2 && barg2->op_code == BinaryOpcode::power && !isLatexOutput(output_type))
-- 
GitLab