From e5121176a91a6105ab07b1bc7a0be18f3757f029 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Mon, 24 Jun 2019 16:16:22 +0200
Subject: [PATCH] fix typo/aesthetic fixes

---
 src/macro/Environment.cc | 2 +-
 src/macro/Expressions.cc | 8 +++++---
 src/macro/Parser.yy      | 1 -
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/macro/Environment.cc b/src/macro/Environment.cc
index 03206a2b..fcb8aa5c 100644
--- a/src/macro/Environment.cc
+++ b/src/macro/Environment.cc
@@ -110,7 +110,7 @@ Environment::print(ostream &output, int line, bool save) const
     {
       output << (save ? "options_.macrovars_line_" + to_string(line) + "." : "  " );
       output << it.first << " = ";
-      getVariable(it.first)->eval()->print(output, true);
+      getVariable(it.first)->eval()->print(output, save);
       if (save)
         output << ";";
       output << endl;
diff --git a/src/macro/Expressions.cc b/src/macro/Expressions.cc
index e7cff488..4b1b6fa2 100644
--- a/src/macro/Expressions.cc
+++ b/src/macro/Expressions.cc
@@ -913,7 +913,8 @@ Comprehension::eval()
           {
             auto mt2 = dynamic_pointer_cast<Tuple>(btp);
             if (mt->size() != mt2->size())
-              throw StackTrace("Comprehension", "The number of elements in the input set tuple are not the same as the number of elements in the output expression tuple", location);
+              throw StackTrace("Comprehension", "The number of elements in the input set tuple are not "
+                               "the same as the number of elements in the output expression tuple", location);
 
             for (size_t j = 0; j < mt->size(); j++)
               {
@@ -924,7 +925,8 @@ Comprehension::eval()
               }
           }
         else
-          throw StackTrace("Comprehension", "assigning to tuple in output expression but input expression does not contain tuples", location);
+          throw StackTrace("Comprehension", "assigning to tuple in output expression "
+                           "but input expression does not contain tuples", location);
 
       DoublePtr dp;
       BoolPtr bp;
@@ -1132,7 +1134,7 @@ String::print(ostream &output, bool matlab_output) const noexcept
 void
 Array::print(ostream &output, bool matlab_output) const noexcept
 {
-output << (matlab_output ? "{" : "[");
+  output << (matlab_output ? "{" : "[");
   for (auto it = arr.begin(); it != arr.end(); it++)
     {
       if (it != arr.begin())
diff --git a/src/macro/Parser.yy b/src/macro/Parser.yy
index cf1b4c4b..85972412 100644
--- a/src/macro/Parser.yy
+++ b/src/macro/Parser.yy
@@ -82,7 +82,6 @@ using namespace macro;
 %left TIMES DIVIDE
 %precedence UMINUS UPLUS NOT
 %nonassoc POWER
- //%precedence LBRACKET
 
 %token <string> NAME TEXT QUOTED_STRING NUMBER EOL
 
-- 
GitLab