24 def __init__(self, parent=None): |
24 def __init__(self, parent=None): |
25 """ |
25 """ |
26 Constructor |
26 Constructor |
27 |
27 |
28 @param parent parent widget of this lexer |
28 @param parent parent widget of this lexer |
29 @type QObject |
29 @type QWidget |
30 """ |
30 """ |
31 QsciLexerCPP.__init__( |
31 QsciLexerCPP.__init__( |
32 self, parent, Preferences.getEditor("CppCaseInsensitiveKeywords") |
32 self, parent, Preferences.getEditor("CppCaseInsensitiveKeywords") |
33 ) |
33 ) |
34 SubstyledLexer.__init__(self) |
34 SubstyledLexer.__init__(self) |
138 |
138 |
139 def autoCompletionWordSeparators(self): |
139 def autoCompletionWordSeparators(self): |
140 """ |
140 """ |
141 Public method to return the list of separators for autocompletion. |
141 Public method to return the list of separators for autocompletion. |
142 |
142 |
143 @return list of separators (list of strings) |
143 @return list of separators |
|
144 @rtype list of str |
144 """ |
145 """ |
145 return ["::", "->", "."] |
146 return ["::", "->", "."] |
146 |
147 |
147 def isCommentStyle(self, style): |
148 def isCommentStyle(self, style): |
148 """ |
149 """ |
149 Public method to check, if a style is a comment style. |
150 Public method to check, if a style is a comment style. |
150 |
151 |
151 @param style style to check (integer) |
152 @param style style to check |
152 @return flag indicating a comment style (boolean) |
153 @type int |
|
154 @return flag indicating a comment style |
|
155 @rtype bool |
153 """ |
156 """ |
154 return style in [ |
157 return style in [ |
155 QsciLexerCPP.Comment, |
158 QsciLexerCPP.Comment, |
156 QsciLexerCPP.CommentDoc, |
159 QsciLexerCPP.CommentDoc, |
157 QsciLexerCPP.CommentLine, |
160 QsciLexerCPP.CommentLine, |
160 |
163 |
161 def isStringStyle(self, style): |
164 def isStringStyle(self, style): |
162 """ |
165 """ |
163 Public method to check, if a style is a string style. |
166 Public method to check, if a style is a string style. |
164 |
167 |
165 @param style style to check (integer) |
168 @param style style to check |
166 @return flag indicating a string style (boolean) |
169 @type int |
|
170 @return flag indicating a string style |
|
171 @rtype bool |
167 """ |
172 """ |
168 return style in [ |
173 return style in [ |
169 QsciLexerCPP.DoubleQuotedString, |
174 QsciLexerCPP.DoubleQuotedString, |
170 QsciLexerCPP.SingleQuotedString, |
175 QsciLexerCPP.SingleQuotedString, |
171 QsciLexerCPP.UnclosedString, |
176 QsciLexerCPP.UnclosedString, |
174 |
179 |
175 def defaultKeywords(self, kwSet): |
180 def defaultKeywords(self, kwSet): |
176 """ |
181 """ |
177 Public method to get the default keywords. |
182 Public method to get the default keywords. |
178 |
183 |
179 @param kwSet number of the keyword set (integer) |
184 @param kwSet number of the keyword set |
180 @return string giving the keywords (string) or None |
185 @type int |
|
186 @return string giving the keywords or None |
|
187 @rtype str |
181 """ |
188 """ |
182 return QsciLexerCPP.keywords(self, kwSet) |
189 return QsciLexerCPP.keywords(self, kwSet) |
183 |
190 |
184 def maximumKeywordSet(self): |
191 def maximumKeywordSet(self): |
185 """ |
192 """ |
186 Public method to get the maximum keyword set. |
193 Public method to get the maximum keyword set. |
187 |
194 |
188 @return maximum keyword set (integer) |
195 @return maximum keyword set |
|
196 @rtype int |
189 """ |
197 """ |
190 return 4 |
198 return 4 |
191 |
199 |
192 |
200 |
193 def createLexer(variant="", parent=None): # noqa: U100 |
201 def createLexer(variant="", parent=None): # noqa: U100 |