I am working with a token on javascript and I wonder if anyone knows a way for knowing if the next token is one closing a parenthesis.
For example: Let's say we have the string "$(var8(today())) - $(storm())"
How can I know that the parenthesis that is between $
and var8
is being closed?
I could not found any boolean function for that or couldn't come in a simple way.
I have tried using REgrex but it turns the function really complex.
I am using the codemirror Api codemirror.net/doc/manual.html#api