5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.AstUtilities</h1> |
9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.AstUtilities</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing some utility and compatibility functions for working with |
11 Module implementing some utility and compatibility functions for working with |
13 the ast module. |
12 the ast module. |
14 </p> |
13 </p> |
|
14 |
15 <h3>Global Attributes</h3> |
15 <h3>Global Attributes</h3> |
16 |
|
17 <table> |
16 <table> |
18 <tr><td>None</td></tr> |
17 <tr><td>None</td></tr> |
19 </table> |
18 </table> |
|
19 |
20 <h3>Classes</h3> |
20 <h3>Classes</h3> |
21 |
|
22 <table> |
21 <table> |
23 <tr><td>None</td></tr> |
22 <tr><td>None</td></tr> |
24 </table> |
23 </table> |
|
24 |
25 <h3>Functions</h3> |
25 <h3>Functions</h3> |
26 |
|
27 <table> |
26 <table> |
28 |
|
29 <tr> |
27 <tr> |
30 <td><a href="#getValue">getValue</a></td> |
28 <td><a href="#getValue">getValue</a></td> |
31 <td>Function to extract the value of a node.</td> |
29 <td>Function to extract the value of a node.</td> |
32 </tr> |
30 </tr> |
33 <tr> |
31 <tr> |
53 <tr> |
51 <tr> |
54 <td><a href="#isString">isString</a></td> |
52 <td><a href="#isString">isString</a></td> |
55 <td>Function to check that a node is a string.</td> |
53 <td>Function to check that a node is a string.</td> |
56 </tr> |
54 </tr> |
57 </table> |
55 </table> |
|
56 |
58 <hr /> |
57 <hr /> |
59 <hr /> |
58 <hr /> |
60 <a NAME="getValue" ID="getValue"></a> |
59 <a NAME="getValue" ID="getValue"></a> |
61 <h2>getValue</h2> |
60 <h2>getValue</h2> |
62 <b>getValue</b>(<i>node</i>) |
61 <b>getValue</b>(<i>node</i>) |
63 |
|
64 <p> |
62 <p> |
65 Function to extract the value of a node. |
63 Function to extract the value of a node. |
66 </p> |
64 </p> |
|
65 |
67 <dl> |
66 <dl> |
68 |
67 |
69 <dt><i>node</i> (ast.Constant)</dt> |
68 <dt><i>node</i> (ast.Constant)</dt> |
70 <dd> |
69 <dd> |
71 reference to the node to extract the value from |
70 reference to the node to extract the value from |
94 <hr /> |
93 <hr /> |
95 <hr /> |
94 <hr /> |
96 <a NAME="isBaseString" ID="isBaseString"></a> |
95 <a NAME="isBaseString" ID="isBaseString"></a> |
97 <h2>isBaseString</h2> |
96 <h2>isBaseString</h2> |
98 <b>isBaseString</b>(<i>node</i>) |
97 <b>isBaseString</b>(<i>node</i>) |
99 |
|
100 <p> |
98 <p> |
101 Function to check that a node is a bytes or string. |
99 Function to check that a node is a bytes or string. |
102 </p> |
100 </p> |
|
101 |
103 <dl> |
102 <dl> |
104 |
103 |
105 <dt><i>node</i> (ast.AST)</dt> |
104 <dt><i>node</i> (ast.AST)</dt> |
106 <dd> |
105 <dd> |
107 reference to the node to check |
106 reference to the node to check |
123 <hr /> |
122 <hr /> |
124 <hr /> |
123 <hr /> |
125 <a NAME="isBytes" ID="isBytes"></a> |
124 <a NAME="isBytes" ID="isBytes"></a> |
126 <h2>isBytes</h2> |
125 <h2>isBytes</h2> |
127 <b>isBytes</b>(<i>node</i>) |
126 <b>isBytes</b>(<i>node</i>) |
128 |
|
129 <p> |
127 <p> |
130 Function to check that a node is a bytes. |
128 Function to check that a node is a bytes. |
131 </p> |
129 </p> |
|
130 |
132 <dl> |
131 <dl> |
133 |
132 |
134 <dt><i>node</i> (ast.AST)</dt> |
133 <dt><i>node</i> (ast.AST)</dt> |
135 <dd> |
134 <dd> |
136 reference to the node to check |
135 reference to the node to check |
152 <hr /> |
151 <hr /> |
153 <hr /> |
152 <hr /> |
154 <a NAME="isEllipsis" ID="isEllipsis"></a> |
153 <a NAME="isEllipsis" ID="isEllipsis"></a> |
155 <h2>isEllipsis</h2> |
154 <h2>isEllipsis</h2> |
156 <b>isEllipsis</b>(<i>node</i>) |
155 <b>isEllipsis</b>(<i>node</i>) |
157 |
|
158 <p> |
156 <p> |
159 Function to check that a node is an ellipsis. |
157 Function to check that a node is an ellipsis. |
160 </p> |
158 </p> |
|
159 |
161 <dl> |
160 <dl> |
162 |
161 |
163 <dt><i>node</i> (ast.AST)</dt> |
162 <dt><i>node</i> (ast.AST)</dt> |
164 <dd> |
163 <dd> |
165 reference to the node to check |
164 reference to the node to check |
181 <hr /> |
180 <hr /> |
182 <hr /> |
181 <hr /> |
183 <a NAME="isNameConstant" ID="isNameConstant"></a> |
182 <a NAME="isNameConstant" ID="isNameConstant"></a> |
184 <h2>isNameConstant</h2> |
183 <h2>isNameConstant</h2> |
185 <b>isNameConstant</b>(<i>node</i>) |
184 <b>isNameConstant</b>(<i>node</i>) |
186 |
|
187 <p> |
185 <p> |
188 Function to check that a node is a name constant. |
186 Function to check that a node is a name constant. |
189 </p> |
187 </p> |
|
188 |
190 <dl> |
189 <dl> |
191 |
190 |
192 <dt><i>node</i> (ast.AST)</dt> |
191 <dt><i>node</i> (ast.AST)</dt> |
193 <dd> |
192 <dd> |
194 reference to the node to check |
193 reference to the node to check |
210 <hr /> |
209 <hr /> |
211 <hr /> |
210 <hr /> |
212 <a NAME="isNumber" ID="isNumber"></a> |
211 <a NAME="isNumber" ID="isNumber"></a> |
213 <h2>isNumber</h2> |
212 <h2>isNumber</h2> |
214 <b>isNumber</b>(<i>node</i>) |
213 <b>isNumber</b>(<i>node</i>) |
215 |
|
216 <p> |
214 <p> |
217 Function to check that a node is a number. |
215 Function to check that a node is a number. |
218 </p> |
216 </p> |
|
217 |
219 <dl> |
218 <dl> |
220 |
219 |
221 <dt><i>node</i> (ast.AST)</dt> |
220 <dt><i>node</i> (ast.AST)</dt> |
222 <dd> |
221 <dd> |
223 reference to the node to check |
222 reference to the node to check |
239 <hr /> |
238 <hr /> |
240 <hr /> |
239 <hr /> |
241 <a NAME="isString" ID="isString"></a> |
240 <a NAME="isString" ID="isString"></a> |
242 <h2>isString</h2> |
241 <h2>isString</h2> |
243 <b>isString</b>(<i>node</i>) |
242 <b>isString</b>(<i>node</i>) |
244 |
|
245 <p> |
243 <p> |
246 Function to check that a node is a string. |
244 Function to check that a node is a string. |
247 </p> |
245 </p> |
|
246 |
248 <dl> |
247 <dl> |
249 |
248 |
250 <dt><i>node</i> (ast.AST)</dt> |
249 <dt><i>node</i> (ast.AST)</dt> |
251 <dd> |
250 <dd> |
252 reference to the node to check |
251 reference to the node to check |