Commit bcb829fd authored by Houtan Bastani's avatar Houtan Bastani
Browse files

Fix commit reverted in 4d89452e.

(cherry picked from commit 3a622738)
parent 8f143e32
/* /*
* Copyright (C) 2008-2017 Dynare Team * Copyright (C) 2008-2018 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -64,6 +64,10 @@ MacroDriver::parse(const string &f, ostream &out, bool debug, bool no_line_macro ...@@ -64,6 +64,10 @@ MacroDriver::parse(const string &f, ostream &out, bool debug, bool no_line_macro
} }
catch (boost::bad_lexical_cast &) catch (boost::bad_lexical_cast &)
{ {
if (!it->second.empty() && it->second.at(0) == '[' && it->second.at(it->second.length()-1) == ']')
// If the input is an array. Issue #1578
file_with_endl << "@#define " << it->first << " = " << it->second << endl;
else
file_with_endl << "@#define " << it->first << " = \"" << it->second << "\"" << endl; file_with_endl << "@#define " << it->first << " = \"" << it->second << "\"" << endl;
} }
file_with_endl << in.rdbuf() << endl; file_with_endl << in.rdbuf() << endl;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment