QScintilla/Lexers/LexerPython.py

changeset 2965
d133c7edd88a
parent 2302
f29e9405c851
child 3011
18292228c724
equal deleted inserted replaced
2964:84b65fb9e780 2965:d133c7edd88a
33 self.commentString = "#" 33 self.commentString = "#"
34 34
35 def language(self): 35 def language(self):
36 """ 36 """
37 Public method to get the lexer language. 37 Public method to get the lexer language.
38
39 @return lexer language (string)
38 """ 40 """
39 if not self.variant: 41 if not self.variant:
40 return QsciLexerPython.language(self) 42 return QsciLexerPython.language(self)
41 else: 43 else:
42 return self.variant 44 return self.variant
121 123
122 def isCommentStyle(self, style): 124 def isCommentStyle(self, style):
123 """ 125 """
124 Public method to check, if a style is a comment style. 126 Public method to check, if a style is a comment style.
125 127
128 @param style style to check (integer)
126 @return flag indicating a comment style (boolean) 129 @return flag indicating a comment style (boolean)
127 """ 130 """
128 return style in [QsciLexerPython.Comment, 131 return style in [QsciLexerPython.Comment,
129 QsciLexerPython.CommentBlock] 132 QsciLexerPython.CommentBlock]
130 133
131 def isStringStyle(self, style): 134 def isStringStyle(self, style):
132 """ 135 """
133 Public method to check, if a style is a string style. 136 Public method to check, if a style is a string style.
134 137
138 @param style style to check (integer)
135 @return flag indicating a string style (boolean) 139 @return flag indicating a string style (boolean)
136 """ 140 """
137 return style in [QsciLexerPython.DoubleQuotedString, 141 return style in [QsciLexerPython.DoubleQuotedString,
138 QsciLexerPython.SingleQuotedString, 142 QsciLexerPython.SingleQuotedString,
139 QsciLexerPython.TripleDoubleQuotedString, 143 QsciLexerPython.TripleDoubleQuotedString,

eric ide

mercurial