Method
JavaScriptCoreContextcheck_syntax
Declaration [src]
JSCCheckSyntaxResult
jsc_context_check_syntax (
JSCContext* context,
const char* code,
gssize length,
JSCCheckSyntaxMode mode,
const char* uri,
unsigned line_number,
JSCException** exception
)
Description [src]
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
code-
Type:
const char*A JavaScript script to check.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. length-
Type:
gssizeLength of
code, or -1 ifcodeis a nul-terminated string. mode-
Type:
JSCCheckSyntaxModeA
JSCCheckSyntaxMode. uri-
Type:
const char*The source URI.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. line_number-
Type:
unsignedThe starting line number.
exception-
Type:
JSCExceptionReturn location for a
JSCException, orNULLto ignore.The argument will be set by the function. The argument can be NULL.The instance takes ownership of the data, and is responsible for freeing it.
Return value
Type: JSCCheckSyntaxResult
A JSCCheckSyntaxResult.