# eric7.Plugins.CheckerPlugins.SyntaxChecker.jsCheckSyntax

Module implementing the syntax check for JavaScript.

### Global Attributes

None

### Classes

None

### Functions

__jsSyntaxCheck | Function to check a Javascript source file for syntax errors.
initBatchService | Initialize the batch service and return the entry point.
initService | Initialize the service and return the entry point.
jsSyntaxBatchCheck | Module function to check syntax for a batch of files.
jsSyntaxCheck | Function to check a Javascript source file for syntax errors.
workerTask | Module function acting as the parallel worker for the syntax check.

## __jsSyntaxCheck

__jsSyntaxCheck(file, codestring)

Function to check a Javascript source file for syntax errors.

file
  source filename (string)
codestring
  string containing the code to check (string)

Return:
  dictionary with the keys 'error' and 'warnings' which hold a list containing details about the error/ warnings (file name, line number, column, codestring (only at syntax errors), the message, a list with arguments for the message)

Up

## initBatchService

initBatchService()

Initialize the batch service and return the entry point.

Return:
  the entry point for the background client (function)

Up

## initService

initService()

Initialize the service and return the entry point.

Return:
  the entry point for the background client (function)

Up

## jsSyntaxBatchCheck

jsSyntaxBatchCheck(argumentsList, send, fx, cancelled, maxProcesses=0)

Module function to check syntax for a batch of files.

argumentsList (list)
  list of arguments tuples as given for jsSyntaxCheck
send (func)
  reference to send function
fx (str)
  registered service name
cancelled (func)
  reference to function checking for a cancellation
maxProcesses (int)
  number of processes to be used

Up

## jsSyntaxCheck

jsSyntaxCheck(file, codestring)

Function to check a Javascript source file for syntax errors.

file
  source filename (string)
codestring
  string containing the code to check (string)

Return:
  dictionary with the keys 'error' and 'warnings' which hold a list containing details about the error/ warnings (file name, line number, column, codestring (only at syntax errors), the message, a list with arguments for the message)

Up

## workerTask

workerTask(inputQueue, outputQueue)

Module function acting as the parallel worker for the syntax check.

inputQueue
  input queue (multiprocessing.Queue)
outputQueue
  output queue (multiprocessing.Queue)

Up