Closed JuergenWurth closed 8 years ago
Thanks for the nice project. During finding out, whether is can use it within one of my (so far not official) projects, I found a bug in mathpresso.cpp:
/*349*/ if (sym != NULL) \ /*350*/ return MATHPRESSO_TRACE_ERROR(kErrorSymbolAlreadyExists); \ /*351*/ \ /*352*/ sym = d->_builder.newSymbol(StringRef(name, nlen), hVal, kAstSymbolVariable, kAstScopeGlobal); \ /*353*/ if (sym == NULL) \
should be changed to:
/*349*/ if (sym != NULL) \ /*350*/ return MATHPRESSO_TRACE_ERROR(kErrorSymbolAlreadyExists); \ /*351*/ \ /*352*/ sym = d->_builder.newSymbol(StringRef(name, nlen), hVal, type, kAstScopeGlobal); \ /*353*/ if (sym == NULL) \
otherwise it asserts "not a function" and, if the assert was skipped, will "syntax error" for the "(" after the function name in an expression.
BR, Juergen
Thanks, seems you are right. I will try to cover this by a test-case.
Should be fixed, please check it out.
Thanks for the nice project. During finding out, whether is can use it within one of my (so far not official) projects, I found a bug in mathpresso.cpp:
should be changed to:
otherwise it asserts "not a function" and, if the assert was skipped, will "syntax error" for the "(" after the function name in an expression.
BR, Juergen