Commit 899d4f48 authored by Christof Metzger-Kraus's avatar Christof Metzger-Kraus
Browse files

fixing error message for assignments

parent 2e036514
......@@ -101,14 +101,17 @@ void OpalParser::parse(Statement &stat) const {
std::string hint = getHint(name);
unsigned int position = stat.position();
std::string positionIndicator = std::string(position, ' ') + "^\n";
std::ostringstream statStr;
stat.print(statStr);
if (hint != "") {
throw ParseError("OpalParser::parse()",
statStr.str() +
positionIndicator +
"Syntax error, either the keyword REAL is missing or\n" +
hint);
} else {
throw ParseError("OpalParser::parse()",
statStr.str() +
positionIndicator +
"Syntax error, the keyword REAL is missing\n");
}
......
Markdown is supported
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