eric6/Documentation/Source/eric6.Plugins.CheckerPlugins.SyntaxChecker.jsCheckSyntax.html

changeset 6942
2602857055c5
parent 5762
76ef5f340007
child 7273
391d6b7b1eff
equal deleted inserted replaced
6941:f99d60d6b59b 6942:2602857055c5
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.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><a NAME="top" ID="top"></a>
22 <h1>eric6.Plugins.CheckerPlugins.SyntaxChecker.jsCheckSyntax</h1>
23 <p>
24 Module implementing the syntax check for Python 2/3.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr><td>None</td></tr>
33 </table>
34 <h3>Functions</h3>
35 <table>
36 <tr>
37 <td><a href="#__jsSyntaxCheck">__jsSyntaxCheck</a></td>
38 <td>Function to check a Javascript source file for syntax errors.</td>
39 </tr><tr>
40 <td><a href="#initBatchService">initBatchService</a></td>
41 <td>Initialize the batch service and return the entry point.</td>
42 </tr><tr>
43 <td><a href="#initService">initService</a></td>
44 <td>Initialize the service and return the entry point.</td>
45 </tr><tr>
46 <td><a href="#jsSyntaxBatchCheck">jsSyntaxBatchCheck</a></td>
47 <td>Module function to check syntax for a batch of files.</td>
48 </tr><tr>
49 <td><a href="#jsSyntaxCheck">jsSyntaxCheck</a></td>
50 <td>Function to check a Javascript source file for syntax errors.</td>
51 </tr><tr>
52 <td><a href="#normalizeCode">normalizeCode</a></td>
53 <td>Function to normalize the given code.</td>
54 </tr><tr>
55 <td><a href="#worker">worker</a></td>
56 <td>Module function acting as the parallel worker for the style check.</td>
57 </tr>
58 </table>
59 <hr /><hr />
60 <a NAME="__jsSyntaxCheck" ID="__jsSyntaxCheck"></a>
61 <h2>__jsSyntaxCheck</h2>
62 <b>__jsSyntaxCheck</b>(<i>file, codestring</i>)
63 <p>
64 Function to check a Javascript source file for syntax errors.
65 </p><dl>
66 <dt><i>file</i></dt>
67 <dd>
68 source filename (string)
69 </dd><dt><i>codestring</i></dt>
70 <dd>
71 string containing the code to check (string)
72 </dd>
73 </dl><dl>
74 <dt>Returns:</dt>
75 <dd>
76 dictionary with the keys 'error' and 'warnings' which
77 hold a list containing details about the error/ warnings
78 (file name, line number, column, codestring (only at syntax
79 errors), the message, a list with arguments for the message)
80 </dd>
81 </dl>
82 <div align="right"><a href="#top">Up</a></div>
83 <hr /><hr />
84 <a NAME="initBatchService" ID="initBatchService"></a>
85 <h2>initBatchService</h2>
86 <b>initBatchService</b>(<i></i>)
87 <p>
88 Initialize the batch service and return the entry point.
89 </p><dl>
90 <dt>Returns:</dt>
91 <dd>
92 the entry point for the background client (function)
93 </dd>
94 </dl>
95 <div align="right"><a href="#top">Up</a></div>
96 <hr /><hr />
97 <a NAME="initService" ID="initService"></a>
98 <h2>initService</h2>
99 <b>initService</b>(<i></i>)
100 <p>
101 Initialize the service and return the entry point.
102 </p><dl>
103 <dt>Returns:</dt>
104 <dd>
105 the entry point for the background client (function)
106 </dd>
107 </dl>
108 <div align="right"><a href="#top">Up</a></div>
109 <hr /><hr />
110 <a NAME="jsSyntaxBatchCheck" ID="jsSyntaxBatchCheck"></a>
111 <h2>jsSyntaxBatchCheck</h2>
112 <b>jsSyntaxBatchCheck</b>(<i>argumentsList, send, fx, cancelled, maxProcesses=0</i>)
113 <p>
114 Module function to check syntax for a batch of files.
115 </p><dl>
116 <dt><i>argumentsList</i> (list)</dt>
117 <dd>
118 list of arguments tuples as given for jsSyntaxCheck
119 </dd><dt><i>send</i> (func)</dt>
120 <dd>
121 reference to send function
122 </dd><dt><i>fx</i> (str)</dt>
123 <dd>
124 registered service name
125 </dd><dt><i>cancelled</i> (func)</dt>
126 <dd>
127 reference to function checking for a cancellation
128 </dd><dt><i>maxProcesses</i> (int)</dt>
129 <dd>
130 number of processes to be used
131 </dd>
132 </dl>
133 <div align="right"><a href="#top">Up</a></div>
134 <hr /><hr />
135 <a NAME="jsSyntaxCheck" ID="jsSyntaxCheck"></a>
136 <h2>jsSyntaxCheck</h2>
137 <b>jsSyntaxCheck</b>(<i>file, codestring</i>)
138 <p>
139 Function to check a Javascript source file for syntax errors.
140 </p><dl>
141 <dt><i>file</i></dt>
142 <dd>
143 source filename (string)
144 </dd><dt><i>codestring</i></dt>
145 <dd>
146 string containing the code to check (string)
147 </dd>
148 </dl><dl>
149 <dt>Returns:</dt>
150 <dd>
151 dictionary with the keys 'error' and 'warnings' which
152 hold a list containing details about the error/ warnings
153 (file name, line number, column, codestring (only at syntax
154 errors), the message, a list with arguments for the message)
155 </dd>
156 </dl>
157 <div align="right"><a href="#top">Up</a></div>
158 <hr /><hr />
159 <a NAME="normalizeCode" ID="normalizeCode"></a>
160 <h2>normalizeCode</h2>
161 <b>normalizeCode</b>(<i>codestring</i>)
162 <p>
163 Function to normalize the given code.
164 </p><dl>
165 <dt><i>codestring</i></dt>
166 <dd>
167 code to be normalized (string)
168 </dd>
169 </dl><dl>
170 <dt>Returns:</dt>
171 <dd>
172 normalized code (string)
173 </dd>
174 </dl>
175 <div align="right"><a href="#top">Up</a></div>
176 <hr /><hr />
177 <a NAME="worker" ID="worker"></a>
178 <h2>worker</h2>
179 <b>worker</b>(<i>inputQueue, outputQueue</i>)
180 <p>
181 Module function acting as the parallel worker for the style check.
182 </p><dl>
183 <dt><i>inputQueue</i></dt>
184 <dd>
185 input queue (multiprocessing.Queue)
186 </dd><dt><i>outputQueue</i></dt>
187 <dd>
188 output queue (multiprocessing.Queue)
189 </dd>
190 </dl>
191 <div align="right"><a href="#top">Up</a></div>
192 <hr />
193 </body></html>

eric ide

mercurial