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