src/eric7/QScintilla/Lexers/LexerCSS.py

branch
eric7
changeset 10431
64157aeb0312
parent 10375
ac11b0e49504
child 10439
21c28b0f9e41
equal deleted inserted replaced
10430:e440aaf179ce 10431:64157aeb0312
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 QWidget
29 """ 30 """
30 QsciLexerCSS.__init__(self, parent) 31 QsciLexerCSS.__init__(self, parent)
31 Lexer.__init__(self) 32 Lexer.__init__(self)
32 33
33 self.streamCommentString = {"start": "/* ", "end": " */"} 34 self.streamCommentString = {"start": "/* ", "end": " */"}
56 57
57 def isCommentStyle(self, style): 58 def isCommentStyle(self, style):
58 """ 59 """
59 Public method to check, if a style is a comment style. 60 Public method to check, if a style is a comment style.
60 61
61 @param style style to check (integer) 62 @param style style to check
62 @return flag indicating a comment style (boolean) 63 @type int
64 @return flag indicating a comment style
65 @rtype bool
63 """ 66 """
64 return style in [QsciLexerCSS.Comment] 67 return style in [QsciLexerCSS.Comment]
65 68
66 def isStringStyle(self, style): 69 def isStringStyle(self, style):
67 """ 70 """
68 Public method to check, if a style is a string style. 71 Public method to check, if a style is a string style.
69 72
70 @param style style to check (integer) 73 @param style style to check
71 @return flag indicating a string style (boolean) 74 @type int
75 @return flag indicating a string style
76 @rtype bool
72 """ 77 """
73 return style in [ 78 return style in [
74 QsciLexerCSS.DoubleQuotedString, 79 QsciLexerCSS.DoubleQuotedString,
75 QsciLexerCSS.SingleQuotedString, 80 QsciLexerCSS.SingleQuotedString,
76 ] 81 ]
77 82
78 def defaultKeywords(self, kwSet): 83 def defaultKeywords(self, kwSet):
79 """ 84 """
80 Public method to get the default keywords. 85 Public method to get the default keywords.
81 86
82 @param kwSet number of the keyword set (integer) 87 @param kwSet number of the keyword set
83 @return string giving the keywords (string) or None 88 @type int
89 @return string giving the keywords or None
90 @rtype str
84 """ 91 """
85 if kwSet == 1: 92 if kwSet == 1:
86 return ( 93 return (
87 "color background-color background-image background-repeat" 94 "color background-color background-image background-repeat"
88 " background-attachment background-position background" 95 " background-attachment background-position background"

eric ide

mercurial