Context.checkSyntax

javascriptcore.types.CheckSyntaxResult checkSyntax(string code, javascriptcore.types.CheckSyntaxMode mode, string uri, uint lineNumber, out javascriptcore.exception.ExceptionWrap exception)

Check the given code in context for syntax errors. The line_number is the starting line number in uri; the value is one-based so the first line is 1. uri and line_number are only used to fill the exception. In case of errors exception will be set to a new #JSCException with the details. You can pass null to exception to ignore the error details.

Parameters

codea JavaScript script to check
modea #JSCCheckSyntaxMode
urithe source URI
lineNumberthe starting line number
exceptionreturn location for a #JSCException, or null to ignore

Returns

a #JSCCheckSyntaxResult