|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Plugins.CheckerPlugins.SyntaxChecker.jsCheckSyntax</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.Plugins.CheckerPlugins.SyntaxChecker.jsCheckSyntax</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the syntax check for JavaScript. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 <tr><td>None</td></tr> |
|
23 </table> |
|
24 <h3>Functions</h3> |
|
25 |
|
26 <table> |
|
27 |
|
28 <tr> |
|
29 <td><a href="#__jsSyntaxCheck">__jsSyntaxCheck</a></td> |
|
30 <td>Function to check a JavaScript source file for syntax errors.</td> |
|
31 </tr> |
|
32 <tr> |
|
33 <td><a href="#initBatchService">initBatchService</a></td> |
|
34 <td>Initialize the batch service and return the entry point.</td> |
|
35 </tr> |
|
36 <tr> |
|
37 <td><a href="#initService">initService</a></td> |
|
38 <td>Initialize the service and return the entry point.</td> |
|
39 </tr> |
|
40 <tr> |
|
41 <td><a href="#jsSyntaxBatchCheck">jsSyntaxBatchCheck</a></td> |
|
42 <td>Module function to check syntax for a batch of files.</td> |
|
43 </tr> |
|
44 <tr> |
|
45 <td><a href="#jsSyntaxCheck">jsSyntaxCheck</a></td> |
|
46 <td>Function to check a Javascript source file for syntax errors.</td> |
|
47 </tr> |
|
48 <tr> |
|
49 <td><a href="#workerTask">workerTask</a></td> |
|
50 <td>Module function acting as the parallel worker for the syntax check.</td> |
|
51 </tr> |
|
52 </table> |
|
53 <hr /> |
|
54 <hr /> |
|
55 <a NAME="__jsSyntaxCheck" ID="__jsSyntaxCheck"></a> |
|
56 <h2>__jsSyntaxCheck</h2> |
|
57 <b>__jsSyntaxCheck</b>(<i>file, codestring</i>) |
|
58 |
|
59 <p> |
|
60 Function to check a JavaScript source file for syntax errors. |
|
61 </p> |
|
62 <dl> |
|
63 |
|
64 <dt><i>file</i> (str)</dt> |
|
65 <dd> |
|
66 source filename |
|
67 </dd> |
|
68 <dt><i>codestring</i> (str)</dt> |
|
69 <dd> |
|
70 string containing the code to check |
|
71 </dd> |
|
72 </dl> |
|
73 <dl> |
|
74 <dt>Return:</dt> |
|
75 <dd> |
|
76 list of dictionaries with the key 'error' which contain a tuple with |
|
77 details about the syntax error. Each tuple contains the file name, line |
|
78 number, column, code string and the error message. |
|
79 </dd> |
|
80 </dl> |
|
81 <dl> |
|
82 <dt>Return Type:</dt> |
|
83 <dd> |
|
84 list of dict |
|
85 </dd> |
|
86 </dl> |
|
87 <div align="right"><a href="#top">Up</a></div> |
|
88 <hr /> |
|
89 <hr /> |
|
90 <a NAME="initBatchService" ID="initBatchService"></a> |
|
91 <h2>initBatchService</h2> |
|
92 <b>initBatchService</b>(<i></i>) |
|
93 |
|
94 <p> |
|
95 Initialize the batch service and return the entry point. |
|
96 </p> |
|
97 <dl> |
|
98 <dt>Return:</dt> |
|
99 <dd> |
|
100 the entry point for the background client |
|
101 </dd> |
|
102 </dl> |
|
103 <dl> |
|
104 <dt>Return Type:</dt> |
|
105 <dd> |
|
106 function |
|
107 </dd> |
|
108 </dl> |
|
109 <div align="right"><a href="#top">Up</a></div> |
|
110 <hr /> |
|
111 <hr /> |
|
112 <a NAME="initService" ID="initService"></a> |
|
113 <h2>initService</h2> |
|
114 <b>initService</b>(<i></i>) |
|
115 |
|
116 <p> |
|
117 Initialize the service and return the entry point. |
|
118 </p> |
|
119 <dl> |
|
120 <dt>Return:</dt> |
|
121 <dd> |
|
122 the entry point for the background client |
|
123 </dd> |
|
124 </dl> |
|
125 <dl> |
|
126 <dt>Return Type:</dt> |
|
127 <dd> |
|
128 function |
|
129 </dd> |
|
130 </dl> |
|
131 <div align="right"><a href="#top">Up</a></div> |
|
132 <hr /> |
|
133 <hr /> |
|
134 <a NAME="jsSyntaxBatchCheck" ID="jsSyntaxBatchCheck"></a> |
|
135 <h2>jsSyntaxBatchCheck</h2> |
|
136 <b>jsSyntaxBatchCheck</b>(<i>argumentsList, send, fx, cancelled, maxProcesses=0</i>) |
|
137 |
|
138 <p> |
|
139 Module function to check syntax for a batch of files. |
|
140 </p> |
|
141 <dl> |
|
142 |
|
143 <dt><i>argumentsList</i> (list)</dt> |
|
144 <dd> |
|
145 list of arguments tuples as given for jsSyntaxCheck |
|
146 </dd> |
|
147 <dt><i>send</i> (function)</dt> |
|
148 <dd> |
|
149 reference to send function |
|
150 </dd> |
|
151 <dt><i>fx</i> (str)</dt> |
|
152 <dd> |
|
153 registered service name |
|
154 </dd> |
|
155 <dt><i>cancelled</i> (function)</dt> |
|
156 <dd> |
|
157 reference to function checking for a cancellation |
|
158 </dd> |
|
159 <dt><i>maxProcesses</i> (int)</dt> |
|
160 <dd> |
|
161 number of processes to be used |
|
162 </dd> |
|
163 </dl> |
|
164 <div align="right"><a href="#top">Up</a></div> |
|
165 <hr /> |
|
166 <hr /> |
|
167 <a NAME="jsSyntaxCheck" ID="jsSyntaxCheck"></a> |
|
168 <h2>jsSyntaxCheck</h2> |
|
169 <b>jsSyntaxCheck</b>(<i>file, codestring</i>) |
|
170 |
|
171 <p> |
|
172 Function to check a Javascript source file for syntax errors. |
|
173 </p> |
|
174 <dl> |
|
175 |
|
176 <dt><i>file</i> (str)</dt> |
|
177 <dd> |
|
178 source filename |
|
179 </dd> |
|
180 <dt><i>codestring</i> (str)</dt> |
|
181 <dd> |
|
182 string containing the code to check |
|
183 </dd> |
|
184 </dl> |
|
185 <dl> |
|
186 <dt>Return:</dt> |
|
187 <dd> |
|
188 list of dictionaries with the key 'error' which contain a tuple with |
|
189 details about the syntax error. Each tuple contains the file name, line |
|
190 number, column, code string and the error message. |
|
191 </dd> |
|
192 </dl> |
|
193 <dl> |
|
194 <dt>Return Type:</dt> |
|
195 <dd> |
|
196 list of dict |
|
197 </dd> |
|
198 </dl> |
|
199 <div align="right"><a href="#top">Up</a></div> |
|
200 <hr /> |
|
201 <hr /> |
|
202 <a NAME="workerTask" ID="workerTask"></a> |
|
203 <h2>workerTask</h2> |
|
204 <b>workerTask</b>(<i>inputQueue, outputQueue</i>) |
|
205 |
|
206 <p> |
|
207 Module function acting as the parallel worker for the syntax check. |
|
208 </p> |
|
209 <dl> |
|
210 |
|
211 <dt><i>inputQueue</i> (multiprocessing.Queue)</dt> |
|
212 <dd> |
|
213 input queue |
|
214 </dd> |
|
215 <dt><i>outputQueue</i> (multiprocessing.Queue)</dt> |
|
216 <dd> |
|
217 output queue |
|
218 </dd> |
|
219 </dl> |
|
220 <div align="right"><a href="#top">Up</a></div> |
|
221 <hr /> |
|
222 </body></html> |