Method

WPEJavaScriptCoreContextcheck_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 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 gssize
 

Length of code, or -1 if code is a nul-terminated string.

mode JSCCheckSyntaxMode
 

A JSCCheckSyntaxMode.

uri 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 unsigned
 

The starting line number.

exception JSCException
 

Return location for a JSCException, or NULL to 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

Returns: JSCCheckSyntaxResult
 

A JSCCheckSyntaxResult.