pub unsafe extern "C" fn JSCheckScriptSyntax(
ctx: JSContextRef,
script: JSStringRef,
sourceURL: JSStringRef,
startingLineNumber: c_int,
exception: *mut JSValueRef,
) -> boolExpand description
Checks for syntax errors in a string of JavaScript.
ctx: The execution context to use.script: AJSStringRefcontaining the script to check for syntax errors.sourceURL: AJSStringRefcontaining a URL for the script’s source file. This is only used when reporting exceptions. PassNULLif you do not care to include source file information in exceptions.startingLineNumber: An integer value specifying the script’s starting line number in the file located atsourceURL. This is only used when reporting exceptions. The value is one-based, so the first line is line1and invalid values are clamped to1.exception: A pointer to aJSValueRefin which to store a syntax error exception, if any. PassNULLif you do not care to store a syntax error exception.
Returns true if the script is syntactically correct, otherwise false.