Hi RavinWorx,
Consider using a JavaScript parsing library. Esprima is one that's written in JavaScript.
Edit: Note that a parsing library is useful if you need to perform semantic analysis of any kind. The ClearScript methods you mentioned all throw exceptions if the code contains syntax errors.
Good luck!
Consider using a JavaScript parsing library. Esprima is one that's written in JavaScript.
Edit: Note that a parsing library is useful if you need to perform semantic analysis of any kind. The ClearScript methods you mentioned all throw exceptions if the code contains syntax errors.
Good luck!