Documentation/Source/eric5.QScintilla.Lexers.LexerPython.html

changeset 58
37f0444c3479
parent 21
b88a0e6268bd
child 130
fcce4cc20d95
equal deleted inserted replaced
57:81326a94fdca 58:37f0444c3479
20 </style> 20 </style>
21 </head> 21 </head>
22 <body><a NAME="top" ID="top"></a> 22 <body><a NAME="top" ID="top"></a>
23 <h1>eric5.QScintilla.Lexers.LexerPython</h1> 23 <h1>eric5.QScintilla.Lexers.LexerPython</h1>
24 <p> 24 <p>
25 &#77;&#111;&#100;&#117;&#108;&#101; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#97; &#80;y&#116;&#104;&#111;&#110; &#108;&#101;x&#101;&#114; w&#105;&#116;&#104; &#115;&#111;&#109;&#101; &#97;&#100;&#100;&#105;&#116;&#105;&#111;&#110;&#97;&#108; &#109;&#101;&#116;&#104;&#111;&#100;&#115;. 25 Module implementing a Python lexer with some additional methods.
26 </p> 26 </p>
27 <h3>Global Attributes</h3> 27 <h3>Global Attributes</h3>
28 <table> 28 <table>
29 <tr><td>None</td></tr> 29 <tr><td>None</td></tr>
30 </table> 30 </table>
31 <h3>Classes</h3> 31 <h3>Classes</h3>
32 <table> 32 <table>
33 <tr> 33 <tr>
34 <td><a href="#LexerPython">LexerPython</a></td> 34 <td><a href="#LexerPython">LexerPython</a></td>
35 <td>&#83;&#117;&#98;&#99;&#108;&#97;&#115;&#115; &#116;&#111; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116; &#115;&#111;&#109;&#101; &#97;&#100;&#100;&#105;&#116;&#105;&#111;&#110;&#97;&#108; &#108;&#101;x&#101;&#114; &#100;&#101;&#112;&#101;&#110;&#100;&#97;&#110;&#116; &#109;&#101;&#116;&#104;&#111;&#100;&#115;.</td> 35 <td>Subclass to implement some additional lexer dependant methods.</td>
36 </tr> 36 </tr>
37 </table> 37 </table>
38 <h3>Functions</h3> 38 <h3>Functions</h3>
39 <table> 39 <table>
40 <tr><td>None</td></tr> 40 <tr><td>None</td></tr>
43 <a NAME="LexerPython" ID="LexerPython"></a> 43 <a NAME="LexerPython" ID="LexerPython"></a>
44 <h2>LexerPython</h2> 44 <h2>LexerPython</h2>
45 <p> 45 <p>
46 46
47 </p><p> 47 </p><p>
48 &#83;&#117;&#98;&#99;&#108;&#97;&#115;&#115; &#116;&#111; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116; &#115;&#111;&#109;&#101; &#97;&#100;&#100;&#105;&#116;&#105;&#111;&#110;&#97;&#108; &#108;&#101;x&#101;&#114; &#100;&#101;&#112;&#101;&#110;&#100;&#97;&#110;&#116; &#109;&#101;&#116;&#104;&#111;&#100;&#115;. 48 Subclass to implement some additional lexer dependant methods.
49 </p> 49 </p>
50 <h3>Derived from</h3> 50 <h3>Derived from</h3>
51 QsciLexerPython, Lexer 51 QsciLexerPython, Lexer
52 <h3>Class Attributes</h3> 52 <h3>Class Attributes</h3>
53 <table> 53 <table>
55 </table> 55 </table>
56 <h3>Methods</h3> 56 <h3>Methods</h3>
57 <table> 57 <table>
58 <tr> 58 <tr>
59 <td><a href="#LexerPython.__init__">LexerPython</a></td> 59 <td><a href="#LexerPython.__init__">LexerPython</a></td>
60 <td>&#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114;</td> 60 <td>Constructor</td>
61 </tr><tr> 61 </tr><tr>
62 <td><a href="#LexerPython.autoCompletionWordSeparators">autoCompletionWordSeparators</a></td> 62 <td><a href="#LexerPython.autoCompletionWordSeparators">autoCompletionWordSeparators</a></td>
63 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#117;&#114;&#110; &#116;&#104;&#101; &#108;&#105;&#115;&#116; &#111;&#102; &#115;&#101;&#112;&#97;&#114;&#97;&#116;&#111;&#114;&#115; &#102;&#111;&#114; &#97;&#117;&#116;&#111;&#99;&#111;&#109;&#112;&#108;&#101;&#116;&#105;&#111;&#110;.</td> 63 <td>Public method to return the list of separators for autocompletion.</td>
64 </tr><tr> 64 </tr><tr>
65 <td><a href="#LexerPython.getIndentationDifference">getIndentationDifference</a></td> 65 <td><a href="#LexerPython.getIndentationDifference">getIndentationDifference</a></td>
66 <td>&#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#100;&#101;&#116;&#101;&#114;&#109;&#105;&#110;&#101; &#116;&#104;&#101; &#100;&#105;&#102;&#102;&#101;&#114;&#101;&#110;&#99;&#101; &#102;&#111;&#114; &#116;&#104;&#101; &#110;&#101;w &#105;&#110;&#100;&#101;&#110;&#116;&#97;&#116;&#105;&#111;&#110;.</td> 66 <td>Private method to determine the difference for the new indentation.</td>
67 </tr><tr> 67 </tr><tr>
68 <td><a href="#LexerPython.initProperties">initProperties</a></td> 68 <td><a href="#LexerPython.initProperties">initProperties</a></td>
69 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#115;&#108;&#111;&#116; &#116;&#111; &#105;&#110;&#105;&#116;&#105;&#97;&#108;&#105;z&#101; &#116;&#104;&#101; &#112;&#114;&#111;&#112;&#101;&#114;&#116;&#105;&#101;&#115;.</td> 69 <td>Public slot to initialize the properties.</td>
70 </tr><tr> 70 </tr><tr>
71 <td><a href="#LexerPython.isCommentStyle">isCommentStyle</a></td> 71 <td><a href="#LexerPython.isCommentStyle">isCommentStyle</a></td>
72 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#104;&#101;&#99;&#107;, &#105;&#102; &#97; &#115;&#116;y&#108;&#101; &#105;&#115; &#97; &#99;&#111;&#109;&#109;&#101;&#110;&#116; &#115;&#116;y&#108;&#101;.</td> 72 <td>Public method to check, if a style is a comment style.</td>
73 </tr><tr> 73 </tr><tr>
74 <td><a href="#LexerPython.isStringStyle">isStringStyle</a></td> 74 <td><a href="#LexerPython.isStringStyle">isStringStyle</a></td>
75 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#104;&#101;&#99;&#107;, &#105;&#102; &#97; &#115;&#116;y&#108;&#101; &#105;&#115; &#97; &#115;&#116;&#114;&#105;&#110;&#103; &#115;&#116;y&#108;&#101;.</td> 75 <td>Public method to check, if a style is a string style.</td>
76 </tr> 76 </tr>
77 </table> 77 </table>
78 <a NAME="LexerPython.__init__" ID="LexerPython.__init__"></a> 78 <a NAME="LexerPython.__init__" ID="LexerPython.__init__"></a>
79 <h4>LexerPython (Constructor)</h4> 79 <h4>LexerPython (Constructor)</h4>
80 <b>LexerPython</b>(<i>parent=None</i>) 80 <b>LexerPython</b>(<i>parent=None</i>)
81 <p> 81 <p>
82 &#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114; 82 Constructor
83 </p><dl> 83 </p><dl>
84 <dt><i>parent</i></dt> 84 <dt><i>parent</i></dt>
85 <dd> 85 <dd>
86 &#112;&#97;&#114;&#101;&#110;&#116; w&#105;&#100;&#103;&#101;&#116; &#111;&#102; &#116;&#104;&#105;&#115; &#108;&#101;x&#101;&#114; 86 parent widget of this lexer
87 </dd> 87 </dd>
88 </dl><a NAME="LexerPython.autoCompletionWordSeparators" ID="LexerPython.autoCompletionWordSeparators"></a> 88 </dl><a NAME="LexerPython.autoCompletionWordSeparators" ID="LexerPython.autoCompletionWordSeparators"></a>
89 <h4>LexerPython.autoCompletionWordSeparators</h4> 89 <h4>LexerPython.autoCompletionWordSeparators</h4>
90 <b>autoCompletionWordSeparators</b>(<i></i>) 90 <b>autoCompletionWordSeparators</b>(<i></i>)
91 <p> 91 <p>
92 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#117;&#114;&#110; &#116;&#104;&#101; &#108;&#105;&#115;&#116; &#111;&#102; &#115;&#101;&#112;&#97;&#114;&#97;&#116;&#111;&#114;&#115; &#102;&#111;&#114; &#97;&#117;&#116;&#111;&#99;&#111;&#109;&#112;&#108;&#101;&#116;&#105;&#111;&#110;. 92 Public method to return the list of separators for autocompletion.
93 </p><dl> 93 </p><dl>
94 <dt>Returns:</dt> 94 <dt>Returns:</dt>
95 <dd> 95 <dd>
96 &#108;&#105;&#115;&#116; &#111;&#102; &#115;&#101;&#112;&#97;&#114;&#97;&#116;&#111;&#114;&#115; (&#108;&#105;&#115;&#116; &#111;&#102; &#115;&#116;&#114;&#105;&#110;&#103;&#115;) 96 list of separators (list of strings)
97 </dd> 97 </dd>
98 </dl><a NAME="LexerPython.getIndentationDifference" ID="LexerPython.getIndentationDifference"></a> 98 </dl><a NAME="LexerPython.getIndentationDifference" ID="LexerPython.getIndentationDifference"></a>
99 <h4>LexerPython.getIndentationDifference</h4> 99 <h4>LexerPython.getIndentationDifference</h4>
100 <b>getIndentationDifference</b>(<i>line, editor</i>) 100 <b>getIndentationDifference</b>(<i>line, editor</i>)
101 <p> 101 <p>
102 &#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#100;&#101;&#116;&#101;&#114;&#109;&#105;&#110;&#101; &#116;&#104;&#101; &#100;&#105;&#102;&#102;&#101;&#114;&#101;&#110;&#99;&#101; &#102;&#111;&#114; &#116;&#104;&#101; &#110;&#101;w &#105;&#110;&#100;&#101;&#110;&#116;&#97;&#116;&#105;&#111;&#110;. 102 Private method to determine the difference for the new indentation.
103 </p><dl> 103 </p><dl>
104 <dt><i>line</i></dt> 104 <dt><i>line</i></dt>
105 <dd> 105 <dd>
106 &#108;&#105;&#110;&#101; &#116;&#111; &#112;&#101;&#114;&#102;&#111;&#114;&#109; &#116;&#104;&#101; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#105;&#111;&#110; &#102;&#111;&#114; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 106 line to perform the calculation for (integer)
107 </dd><dt><i>editor</i></dt> 107 </dd><dt><i>editor</i></dt>
108 <dd> 108 <dd>
109 &#81;&#83;&#99;&#105;&#110;&#116;&#105;&#108;&#108;&#97; &#101;&#100;&#105;&#116;&#111;&#114; 109 QScintilla editor
110 </dd> 110 </dd>
111 </dl><dl> 111 </dl><dl>
112 <dt>Returns:</dt> 112 <dt>Returns:</dt>
113 <dd> 113 <dd>
114 &#97;&#109;&#111;&#117;&#110;&#116; &#111;&#102; &#100;&#105;&#102;&#102;&#101;&#114;&#101;&#110;&#99;&#101; &#105;&#110; &#105;&#110;&#100;&#101;&#110;&#116;&#97;&#116;&#105;&#111;&#110; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 114 amount of difference in indentation (integer)
115 </dd> 115 </dd>
116 </dl><a NAME="LexerPython.initProperties" ID="LexerPython.initProperties"></a> 116 </dl><a NAME="LexerPython.initProperties" ID="LexerPython.initProperties"></a>
117 <h4>LexerPython.initProperties</h4> 117 <h4>LexerPython.initProperties</h4>
118 <b>initProperties</b>(<i></i>) 118 <b>initProperties</b>(<i></i>)
119 <p> 119 <p>
120 &#80;&#117;&#98;&#108;&#105;&#99; &#115;&#108;&#111;&#116; &#116;&#111; &#105;&#110;&#105;&#116;&#105;&#97;&#108;&#105;z&#101; &#116;&#104;&#101; &#112;&#114;&#111;&#112;&#101;&#114;&#116;&#105;&#101;&#115;. 120 Public slot to initialize the properties.
121 </p><a NAME="LexerPython.isCommentStyle" ID="LexerPython.isCommentStyle"></a> 121 </p><a NAME="LexerPython.isCommentStyle" ID="LexerPython.isCommentStyle"></a>
122 <h4>LexerPython.isCommentStyle</h4> 122 <h4>LexerPython.isCommentStyle</h4>
123 <b>isCommentStyle</b>(<i>style</i>) 123 <b>isCommentStyle</b>(<i>style</i>)
124 <p> 124 <p>
125 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#104;&#101;&#99;&#107;, &#105;&#102; &#97; &#115;&#116;y&#108;&#101; &#105;&#115; &#97; &#99;&#111;&#109;&#109;&#101;&#110;&#116; &#115;&#116;y&#108;&#101;. 125 Public method to check, if a style is a comment style.
126 </p><dl> 126 </p><dl>
127 <dt>Returns:</dt> 127 <dt>Returns:</dt>
128 <dd> 128 <dd>
129 &#102;&#108;&#97;&#103; &#105;&#110;&#100;&#105;&#99;&#97;&#116;&#105;&#110;&#103; &#97; &#99;&#111;&#109;&#109;&#101;&#110;&#116; &#115;&#116;y&#108;&#101; (&#98;&#111;&#111;&#108;&#101;&#97;&#110;) 129 flag indicating a comment style (boolean)
130 </dd> 130 </dd>
131 </dl><a NAME="LexerPython.isStringStyle" ID="LexerPython.isStringStyle"></a> 131 </dl><a NAME="LexerPython.isStringStyle" ID="LexerPython.isStringStyle"></a>
132 <h4>LexerPython.isStringStyle</h4> 132 <h4>LexerPython.isStringStyle</h4>
133 <b>isStringStyle</b>(<i>style</i>) 133 <b>isStringStyle</b>(<i>style</i>)
134 <p> 134 <p>
135 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#104;&#101;&#99;&#107;, &#105;&#102; &#97; &#115;&#116;y&#108;&#101; &#105;&#115; &#97; &#115;&#116;&#114;&#105;&#110;&#103; &#115;&#116;y&#108;&#101;. 135 Public method to check, if a style is a string style.
136 </p><dl> 136 </p><dl>
137 <dt>Returns:</dt> 137 <dt>Returns:</dt>
138 <dd> 138 <dd>
139 &#102;&#108;&#97;&#103; &#105;&#110;&#100;&#105;&#99;&#97;&#116;&#105;&#110;&#103; &#97; &#115;&#116;&#114;&#105;&#110;&#103; &#115;&#116;y&#108;&#101; (&#98;&#111;&#111;&#108;&#101;&#97;&#110;) 139 flag indicating a string style (boolean)
140 </dd> 140 </dd>
141 </dl> 141 </dl>
142 <div align="right"><a href="#top">Up</a></div> 142 <div align="right"><a href="#top">Up</a></div>
143 <hr /> 143 <hr />
144 </body></html> 144 </body></html>

eric ide

mercurial