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