|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric4.QScintilla.Lexers.Lexer</title> |
|
6 <style> |
|
7 body { |
|
8 background:white; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #4FA4FF; } |
|
14 h2 { color: white; background: #4FA4FF; } |
|
15 h3 { color: white; background: #00557F; } |
|
16 h4 { color: white; background: #00557F; } |
|
17 |
|
18 a { color: #AA5500; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>eric4.QScintilla.Lexers.Lexer</h1> |
|
24 <p> |
|
25 Module implementing the lexer base class. |
|
26 </p> |
|
27 <h3>Global Attributes</h3> |
|
28 <table> |
|
29 <tr><td>None</td></tr> |
|
30 </table> |
|
31 <h3>Classes</h3> |
|
32 <table> |
|
33 <tr> |
|
34 <td><a href="#Lexer">Lexer</a></td> |
|
35 <td>Class to implement the lexer mixin class.</td> |
|
36 </tr> |
|
37 </table> |
|
38 <h3>Functions</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <hr /><hr /> |
|
43 <a NAME="Lexer" ID="Lexer"></a> |
|
44 <h2>Lexer</h2> |
|
45 <p> |
|
46 |
|
47 </p><p> |
|
48 Class to implement the lexer mixin class. |
|
49 </p> |
|
50 <h3>Derived from</h3> |
|
51 object |
|
52 <h3>Class Attributes</h3> |
|
53 <table> |
|
54 <tr><td>None</td></tr> |
|
55 </table> |
|
56 <h3>Methods</h3> |
|
57 <table> |
|
58 <tr> |
|
59 <td><a href="#Lexer.__init__">Lexer</a></td> |
|
60 <td>Constructor</td> |
|
61 </tr><tr> |
|
62 <td><a href="#Lexer.alwaysKeepTabs">alwaysKeepTabs</a></td> |
|
63 <td>Public method to check, if tab conversion is allowed.</td> |
|
64 </tr><tr> |
|
65 <td><a href="#Lexer.autoCompletionWordSeparators">autoCompletionWordSeparators</a></td> |
|
66 <td>Public method to return the list of separators for autocompletion.</td> |
|
67 </tr><tr> |
|
68 <td><a href="#Lexer.boxCommentStr">boxCommentStr</a></td> |
|
69 <td>Public method to return the box comment strings.</td> |
|
70 </tr><tr> |
|
71 <td><a href="#Lexer.canBlockComment">canBlockComment</a></td> |
|
72 <td>Public method to determine, whether the lexer language supports a block comment.</td> |
|
73 </tr><tr> |
|
74 <td><a href="#Lexer.canBoxComment">canBoxComment</a></td> |
|
75 <td>Public method to determine, whether the lexer language supports a box comment.</td> |
|
76 </tr><tr> |
|
77 <td><a href="#Lexer.canStreamComment">canStreamComment</a></td> |
|
78 <td>Public method to determine, whether the lexer language supports a stream comment.</td> |
|
79 </tr><tr> |
|
80 <td><a href="#Lexer.commentStr">commentStr</a></td> |
|
81 <td>Public method to return the comment string.</td> |
|
82 </tr><tr> |
|
83 <td><a href="#Lexer.hasSmartIndent">hasSmartIndent</a></td> |
|
84 <td>Public method indicating whether lexer can do smart indentation.</td> |
|
85 </tr><tr> |
|
86 <td><a href="#Lexer.initProperties">initProperties</a></td> |
|
87 <td>Public slot to initialize the properties.</td> |
|
88 </tr><tr> |
|
89 <td><a href="#Lexer.isCommentStyle">isCommentStyle</a></td> |
|
90 <td>Public method to check, if a style is a comment style.</td> |
|
91 </tr><tr> |
|
92 <td><a href="#Lexer.isStringStyle">isStringStyle</a></td> |
|
93 <td>Public method to check, if a style is a string style.</td> |
|
94 </tr><tr> |
|
95 <td><a href="#Lexer.smartIndentLine">smartIndentLine</a></td> |
|
96 <td>Public method to handle smart indentation for a line.</td> |
|
97 </tr><tr> |
|
98 <td><a href="#Lexer.smartIndentSelection">smartIndentSelection</a></td> |
|
99 <td>Public method to handle smart indentation for a selection of lines.</td> |
|
100 </tr><tr> |
|
101 <td><a href="#Lexer.streamCommentStr">streamCommentStr</a></td> |
|
102 <td>Public method to return the stream comment strings.</td> |
|
103 </tr> |
|
104 </table> |
|
105 <a NAME="Lexer.__init__" ID="Lexer.__init__"></a> |
|
106 <h4>Lexer (Constructor)</h4> |
|
107 <b>Lexer</b>(<i></i>) |
|
108 <p> |
|
109 Constructor |
|
110 </p><a NAME="Lexer.alwaysKeepTabs" ID="Lexer.alwaysKeepTabs"></a> |
|
111 <h4>Lexer.alwaysKeepTabs</h4> |
|
112 <b>alwaysKeepTabs</b>(<i></i>) |
|
113 <p> |
|
114 Public method to check, if tab conversion is allowed. |
|
115 </p><dl> |
|
116 <dt>Returns:</dt> |
|
117 <dd> |
|
118 flag indicating to keep tabs (boolean) |
|
119 </dd> |
|
120 </dl><a NAME="Lexer.autoCompletionWordSeparators" ID="Lexer.autoCompletionWordSeparators"></a> |
|
121 <h4>Lexer.autoCompletionWordSeparators</h4> |
|
122 <b>autoCompletionWordSeparators</b>(<i></i>) |
|
123 <p> |
|
124 Public method to return the list of separators for autocompletion. |
|
125 </p><dl> |
|
126 <dt>Returns:</dt> |
|
127 <dd> |
|
128 list of separators (list of strings) |
|
129 </dd> |
|
130 </dl><a NAME="Lexer.boxCommentStr" ID="Lexer.boxCommentStr"></a> |
|
131 <h4>Lexer.boxCommentStr</h4> |
|
132 <b>boxCommentStr</b>(<i></i>) |
|
133 <p> |
|
134 Public method to return the box comment strings. |
|
135 </p><dl> |
|
136 <dt>Returns:</dt> |
|
137 <dd> |
|
138 box comment strings (dictionary with three QStrings) |
|
139 </dd> |
|
140 </dl><a NAME="Lexer.canBlockComment" ID="Lexer.canBlockComment"></a> |
|
141 <h4>Lexer.canBlockComment</h4> |
|
142 <b>canBlockComment</b>(<i></i>) |
|
143 <p> |
|
144 Public method to determine, whether the lexer language supports a block comment. |
|
145 </p><dl> |
|
146 <dt>Returns:</dt> |
|
147 <dd> |
|
148 flag (boolean) |
|
149 </dd> |
|
150 </dl><a NAME="Lexer.canBoxComment" ID="Lexer.canBoxComment"></a> |
|
151 <h4>Lexer.canBoxComment</h4> |
|
152 <b>canBoxComment</b>(<i></i>) |
|
153 <p> |
|
154 Public method to determine, whether the lexer language supports a box comment. |
|
155 </p><dl> |
|
156 <dt>Returns:</dt> |
|
157 <dd> |
|
158 flag (boolean) |
|
159 </dd> |
|
160 </dl><a NAME="Lexer.canStreamComment" ID="Lexer.canStreamComment"></a> |
|
161 <h4>Lexer.canStreamComment</h4> |
|
162 <b>canStreamComment</b>(<i></i>) |
|
163 <p> |
|
164 Public method to determine, whether the lexer language supports a stream comment. |
|
165 </p><dl> |
|
166 <dt>Returns:</dt> |
|
167 <dd> |
|
168 flag (boolean) |
|
169 </dd> |
|
170 </dl><a NAME="Lexer.commentStr" ID="Lexer.commentStr"></a> |
|
171 <h4>Lexer.commentStr</h4> |
|
172 <b>commentStr</b>(<i></i>) |
|
173 <p> |
|
174 Public method to return the comment string. |
|
175 </p><dl> |
|
176 <dt>Returns:</dt> |
|
177 <dd> |
|
178 comment string (string) |
|
179 </dd> |
|
180 </dl><a NAME="Lexer.hasSmartIndent" ID="Lexer.hasSmartIndent"></a> |
|
181 <h4>Lexer.hasSmartIndent</h4> |
|
182 <b>hasSmartIndent</b>(<i></i>) |
|
183 <p> |
|
184 Public method indicating whether lexer can do smart indentation. |
|
185 </p><dl> |
|
186 <dt>Returns:</dt> |
|
187 <dd> |
|
188 flag indicating availability of smartIndentLine and |
|
189 smartIndentSelection methods (boolean) |
|
190 </dd> |
|
191 </dl><a NAME="Lexer.initProperties" ID="Lexer.initProperties"></a> |
|
192 <h4>Lexer.initProperties</h4> |
|
193 <b>initProperties</b>(<i></i>) |
|
194 <p> |
|
195 Public slot to initialize the properties. |
|
196 </p><a NAME="Lexer.isCommentStyle" ID="Lexer.isCommentStyle"></a> |
|
197 <h4>Lexer.isCommentStyle</h4> |
|
198 <b>isCommentStyle</b>(<i>style</i>) |
|
199 <p> |
|
200 Public method to check, if a style is a comment style. |
|
201 </p><dl> |
|
202 <dt>Returns:</dt> |
|
203 <dd> |
|
204 flag indicating a comment style (boolean) |
|
205 </dd> |
|
206 </dl><a NAME="Lexer.isStringStyle" ID="Lexer.isStringStyle"></a> |
|
207 <h4>Lexer.isStringStyle</h4> |
|
208 <b>isStringStyle</b>(<i>style</i>) |
|
209 <p> |
|
210 Public method to check, if a style is a string style. |
|
211 </p><dl> |
|
212 <dt>Returns:</dt> |
|
213 <dd> |
|
214 flag indicating a string style (boolean) |
|
215 </dd> |
|
216 </dl><a NAME="Lexer.smartIndentLine" ID="Lexer.smartIndentLine"></a> |
|
217 <h4>Lexer.smartIndentLine</h4> |
|
218 <b>smartIndentLine</b>(<i>editor</i>) |
|
219 <p> |
|
220 Public method to handle smart indentation for a line. |
|
221 </p><dl> |
|
222 <dt><i>editor</i></dt> |
|
223 <dd> |
|
224 reference to the QScintilla editor object |
|
225 </dd> |
|
226 </dl><a NAME="Lexer.smartIndentSelection" ID="Lexer.smartIndentSelection"></a> |
|
227 <h4>Lexer.smartIndentSelection</h4> |
|
228 <b>smartIndentSelection</b>(<i>editor</i>) |
|
229 <p> |
|
230 Public method to handle smart indentation for a selection of lines. |
|
231 </p><p> |
|
232 Note: The assumption is, that the first line determines the new |
|
233 indentation level. |
|
234 </p><dl> |
|
235 <dt><i>editor</i></dt> |
|
236 <dd> |
|
237 reference to the QScintilla editor object |
|
238 </dd> |
|
239 </dl><a NAME="Lexer.streamCommentStr" ID="Lexer.streamCommentStr"></a> |
|
240 <h4>Lexer.streamCommentStr</h4> |
|
241 <b>streamCommentStr</b>(<i></i>) |
|
242 <p> |
|
243 Public method to return the stream comment strings. |
|
244 </p><dl> |
|
245 <dt>Returns:</dt> |
|
246 <dd> |
|
247 stream comment strings (dictionary with two strings) |
|
248 </dd> |
|
249 </dl> |
|
250 <div align="right"><a href="#top">Up</a></div> |
|
251 <hr /> |
|
252 </body></html> |