I need parse a string inside a parenthesis, which looks like (A, B, C), where A, B, and C are string that can contain any legal JavaScript code. For example, B might be a very long string with nested structures similar to (A, B, C). What would be the best way to parse such a string?
An example of the string to parser is invoking a function:
func( parameter 1, parameter 2, parameter 3)
where all the three parameters could be other function definitions.