QScintilla/Lexers/LexerCPP.py

changeset 2965
d133c7edd88a
parent 2302
f29e9405c851
child 3011
18292228c724
equal deleted inserted replaced
2964:84b65fb9e780 2965:d133c7edd88a
20 def __init__(self, parent=None, caseInsensitiveKeywords=False): 20 def __init__(self, parent=None, caseInsensitiveKeywords=False):
21 """ 21 """
22 Constructor 22 Constructor
23 23
24 @param parent parent widget of this lexer 24 @param parent parent widget of this lexer
25 @param caseInsensitiveKeywords flag indicating keywords are case
26 insensitive (boolean)
25 """ 27 """
26 super().__init__(parent, caseInsensitiveKeywords) 28 super().__init__(parent, caseInsensitiveKeywords)
27 Lexer.__init__(self) 29 Lexer.__init__(self)
28 30
29 self.commentString = "//" 31 self.commentString = "//"
80 82
81 def isCommentStyle(self, style): 83 def isCommentStyle(self, style):
82 """ 84 """
83 Public method to check, if a style is a comment style. 85 Public method to check, if a style is a comment style.
84 86
87 @param style style to check (integer)
85 @return flag indicating a comment style (boolean) 88 @return flag indicating a comment style (boolean)
86 """ 89 """
87 return style in [QsciLexerCPP.Comment, 90 return style in [QsciLexerCPP.Comment,
88 QsciLexerCPP.CommentDoc, 91 QsciLexerCPP.CommentDoc,
89 QsciLexerCPP.CommentLine, 92 QsciLexerCPP.CommentLine,
91 94
92 def isStringStyle(self, style): 95 def isStringStyle(self, style):
93 """ 96 """
94 Public method to check, if a style is a string style. 97 Public method to check, if a style is a string style.
95 98
99 @param style style to check (integer)
96 @return flag indicating a string style (boolean) 100 @return flag indicating a string style (boolean)
97 """ 101 """
98 return style in [QsciLexerCPP.DoubleQuotedString, 102 return style in [QsciLexerCPP.DoubleQuotedString,
99 QsciLexerCPP.SingleQuotedString, 103 QsciLexerCPP.SingleQuotedString,
100 QsciLexerCPP.UnclosedString, 104 QsciLexerCPP.UnclosedString,

eric ide

mercurial