Commit a6ee440d authored by Aashish Chaudhary's avatar Aashish Chaudhary Committed by David Partyka
Browse files

Resetting parse error cache at the start of syntax check.

parent c22423d9
......@@ -2229,18 +2229,19 @@ void vtkFunctionParser::CheckExpression(int &pos, char **error)
this->VariableMTime.GetMTime() > this->CheckMTime.GetMTime())
{
// Need to parse again.
// Reset previous error cache.
this->ParseErrorPositon = -1;
this->ParseError = NULL;
this->CopyParseError(pos, error);
}
else
{
pos = this->ParseErrorPositon;
*error = this->ParseError;
this->CopyParseError(pos, error);
return;
}
// Reset.
this->ParseErrorPositon = -1;
this->ParseError = NULL;
this->CheckMTime.Modified();
this->RemoveSpaces();
......@@ -2503,7 +2504,6 @@ void vtkFunctionParser::CheckExpression(int &pos, char **error)
delete [] expectCommaOnParenthesisCount;
delete [] expectTwoCommasOnParenthesisCount;
this->CopyParseError(pos, error);
return;
}
......
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