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