|
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="#normalizeCode">normalizeCode</a></td> |
|
50 <td>Function to normalize the given code.</td> |
|
51 </tr> |
|
52 <tr> |
|
53 <td><a href="#workerTask">workerTask</a></td> |
|
54 <td>Module function acting as the parallel worker for the syntax check.</td> |
|
55 </tr> |
|
56 </table> |
|
57 <hr /> |
|
58 <hr /> |
|
59 <a NAME="__jsSyntaxCheck" ID="__jsSyntaxCheck"></a> |
|
60 <h2>__jsSyntaxCheck</h2> |
|
61 <b>__jsSyntaxCheck</b>(<i>file, codestring</i>) |
|
62 |
|
63 <p> |
|
64 Function to check a Javascript source file for syntax errors. |
|
65 </p> |
|
66 <dl> |
|
67 |
|
68 <dt><i>file</i></dt> |
|
69 <dd> |
|
70 source filename (string) |
|
71 </dd> |
|
72 <dt><i>codestring</i></dt> |
|
73 <dd> |
|
74 string containing the code to check (string) |
|
75 </dd> |
|
76 </dl> |
|
77 <dl> |
|
78 <dt>Return:</dt> |
|
79 <dd> |
|
80 dictionary with the keys 'error' and 'warnings' which |
|
81 hold a list containing details about the error/ warnings |
|
82 (file name, line number, column, codestring (only at syntax |
|
83 errors), the message, a list with arguments for the message) |
|
84 </dd> |
|
85 </dl> |
|
86 <div align="right"><a href="#top">Up</a></div> |
|
87 <hr /> |
|
88 <hr /> |
|
89 <a NAME="initBatchService" ID="initBatchService"></a> |
|
90 <h2>initBatchService</h2> |
|
91 <b>initBatchService</b>(<i></i>) |
|
92 |
|
93 <p> |
|
94 Initialize the batch service and return the entry point. |
|
95 </p> |
|
96 <dl> |
|
97 <dt>Return:</dt> |
|
98 <dd> |
|
99 the entry point for the background client (function) |
|
100 </dd> |
|
101 </dl> |
|
102 <div align="right"><a href="#top">Up</a></div> |
|
103 <hr /> |
|
104 <hr /> |
|
105 <a NAME="initService" ID="initService"></a> |
|
106 <h2>initService</h2> |
|
107 <b>initService</b>(<i></i>) |
|
108 |
|
109 <p> |
|
110 Initialize the service and return the entry point. |
|
111 </p> |
|
112 <dl> |
|
113 <dt>Return:</dt> |
|
114 <dd> |
|
115 the entry point for the background client (function) |
|
116 </dd> |
|
117 </dl> |
|
118 <div align="right"><a href="#top">Up</a></div> |
|
119 <hr /> |
|
120 <hr /> |
|
121 <a NAME="jsSyntaxBatchCheck" ID="jsSyntaxBatchCheck"></a> |
|
122 <h2>jsSyntaxBatchCheck</h2> |
|
123 <b>jsSyntaxBatchCheck</b>(<i>argumentsList, send, fx, cancelled, maxProcesses=0</i>) |
|
124 |
|
125 <p> |
|
126 Module function to check syntax for a batch of files. |
|
127 </p> |
|
128 <dl> |
|
129 |
|
130 <dt><i>argumentsList</i> (list)</dt> |
|
131 <dd> |
|
132 list of arguments tuples as given for jsSyntaxCheck |
|
133 </dd> |
|
134 <dt><i>send</i> (func)</dt> |
|
135 <dd> |
|
136 reference to send function |
|
137 </dd> |
|
138 <dt><i>fx</i> (str)</dt> |
|
139 <dd> |
|
140 registered service name |
|
141 </dd> |
|
142 <dt><i>cancelled</i> (func)</dt> |
|
143 <dd> |
|
144 reference to function checking for a cancellation |
|
145 </dd> |
|
146 <dt><i>maxProcesses</i> (int)</dt> |
|
147 <dd> |
|
148 number of processes to be used |
|
149 </dd> |
|
150 </dl> |
|
151 <div align="right"><a href="#top">Up</a></div> |
|
152 <hr /> |
|
153 <hr /> |
|
154 <a NAME="jsSyntaxCheck" ID="jsSyntaxCheck"></a> |
|
155 <h2>jsSyntaxCheck</h2> |
|
156 <b>jsSyntaxCheck</b>(<i>file, codestring</i>) |
|
157 |
|
158 <p> |
|
159 Function to check a Javascript source file for syntax errors. |
|
160 </p> |
|
161 <dl> |
|
162 |
|
163 <dt><i>file</i></dt> |
|
164 <dd> |
|
165 source filename (string) |
|
166 </dd> |
|
167 <dt><i>codestring</i></dt> |
|
168 <dd> |
|
169 string containing the code to check (string) |
|
170 </dd> |
|
171 </dl> |
|
172 <dl> |
|
173 <dt>Return:</dt> |
|
174 <dd> |
|
175 dictionary with the keys 'error' and 'warnings' which |
|
176 hold a list containing details about the error/ warnings |
|
177 (file name, line number, column, codestring (only at syntax |
|
178 errors), the message, a list with arguments for the message) |
|
179 </dd> |
|
180 </dl> |
|
181 <div align="right"><a href="#top">Up</a></div> |
|
182 <hr /> |
|
183 <hr /> |
|
184 <a NAME="normalizeCode" ID="normalizeCode"></a> |
|
185 <h2>normalizeCode</h2> |
|
186 <b>normalizeCode</b>(<i>codestring</i>) |
|
187 |
|
188 <p> |
|
189 Function to normalize the given code. |
|
190 </p> |
|
191 <dl> |
|
192 |
|
193 <dt><i>codestring</i></dt> |
|
194 <dd> |
|
195 code to be normalized (string) |
|
196 </dd> |
|
197 </dl> |
|
198 <dl> |
|
199 <dt>Return:</dt> |
|
200 <dd> |
|
201 normalized code (string) |
|
202 </dd> |
|
203 </dl> |
|
204 <div align="right"><a href="#top">Up</a></div> |
|
205 <hr /> |
|
206 <hr /> |
|
207 <a NAME="workerTask" ID="workerTask"></a> |
|
208 <h2>workerTask</h2> |
|
209 <b>workerTask</b>(<i>inputQueue, outputQueue</i>) |
|
210 |
|
211 <p> |
|
212 Module function acting as the parallel worker for the syntax check. |
|
213 </p> |
|
214 <dl> |
|
215 |
|
216 <dt><i>inputQueue</i></dt> |
|
217 <dd> |
|
218 input queue (multiprocessing.Queue) |
|
219 </dd> |
|
220 <dt><i>outputQueue</i></dt> |
|
221 <dd> |
|
222 output queue (multiprocessing.Queue) |
|
223 </dd> |
|
224 </dl> |
|
225 <div align="right"><a href="#top">Up</a></div> |
|
226 <hr /> |
|
227 </body></html> |