I am not fluent in js, barely know enough to recognize it when I see it. But I have worked a little with spreadseets, since Daniel S. Bricklin almost single-handedly started the "pc revolution" by inventing VisiCalc.
The Excel Formula you quoted (below) is not completely closed. FUNTION/SUM begins with three left parantheticals, all three of which are closed. But the final factor "*1.08" is not closed. Here it is parsed:
You may find that the entire argument requires inclusion within the paranthenticals, like this:
[count 'em. 6 opening parantheticals, 6 closing parantheticals, including the final factor]
Is there any software out there that can do this?
Thanks for the help