For a function definition a whitespace is needed between the argument parenthesis and the definition operator. Otherwise the function definition throws a cryptic error about that function argument shall not contain the character "()".
Analysis:
The issue results effectively from a change in the behavior of getargatpos(). This function gathers arguments given at a defined position and needs whitespaces as separator characters. This is the intendend behavior, which means that the define function needs to check, if getargatpos() probably returned more than the desired parenthesis.
Implementation:
The following code lines were inserted after sFunctions[nDefine][3] = getArgAtPos(sExpr, sExpr.find('('));:
if (sFunctions[nDefine][3].front() == '('
&& getMatchingParenthesis(sFunctions[nDefine][3]) != string::npos
&& getMatchingParenthesis(sFunctions[nDefine][3]) != sFunctions[nDefine][3].length()-1)
sFunctions[nDefine][3].erase(getMatchingParenthesis(sFunctions[nDefine][3])+1);
This solves the identified issue.
Documentation:
Not needed - Bug fix.
Tests:
Tested was every possible combination of whitespace around the definition operator. Tests were passed without any deviations. Bug fix accepted.
Anonymous
Diff:
Diff:
Diff:
Diff: