src/eric7/QScintilla/Lexers/LexerHTML.py

branch
eric7
changeset 10431
64157aeb0312
parent 10069
435cc5875135
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 QsciLexerHTML.__init__(self, parent) 31 QsciLexerHTML.__init__(self, parent)
31 Lexer.__init__(self) 32 Lexer.__init__(self)
32 33
33 self.streamCommentString = {"start": "<!-- ", "end": " -->"} 34 self.streamCommentString = {"start": "<!-- ", "end": " -->"}
57 58
58 def isCommentStyle(self, style): 59 def isCommentStyle(self, style):
59 """ 60 """
60 Public method to check, if a style is a comment style. 61 Public method to check, if a style is a comment style.
61 62
62 @param style style to check (integer) 63 @param style style to check
63 @return flag indicating a comment style (boolean) 64 @type int
65 @return flag indicating a comment style
66 @rtype bool
64 """ 67 """
65 return style in [ 68 return style in [
66 QsciLexerHTML.HTMLComment, 69 QsciLexerHTML.HTMLComment,
67 QsciLexerHTML.ASPXCComment, 70 QsciLexerHTML.ASPXCComment,
68 QsciLexerHTML.SGMLComment, 71 QsciLexerHTML.SGMLComment,
82 85
83 def isStringStyle(self, style): 86 def isStringStyle(self, style):
84 """ 87 """
85 Public method to check, if a style is a string style. 88 Public method to check, if a style is a string style.
86 89
87 @param style style to check (integer) 90 @param style style to check
88 @return flag indicating a string style (boolean) 91 @type int
92 @return flag indicating a string style
93 @rtype bool
89 """ 94 """
90 return style in [ 95 return style in [
91 QsciLexerHTML.HTMLDoubleQuotedString, 96 QsciLexerHTML.HTMLDoubleQuotedString,
92 QsciLexerHTML.HTMLSingleQuotedString, 97 QsciLexerHTML.HTMLSingleQuotedString,
93 QsciLexerHTML.SGMLDoubleQuotedString, 98 QsciLexerHTML.SGMLDoubleQuotedString,
116 121
117 def defaultKeywords(self, kwSet): 122 def defaultKeywords(self, kwSet):
118 """ 123 """
119 Public method to get the default keywords. 124 Public method to get the default keywords.
120 125
121 @param kwSet number of the keyword set (integer) 126 @param kwSet number of the keyword set
122 @return string giving the keywords (string) or None 127 @type int
128 @return string giving the keywords or None
129 @rtype str
123 """ 130 """
124 return QsciLexerHTML.keywords(self, kwSet) 131 return QsciLexerHTML.keywords(self, kwSet)
125 132
126 133
127 def createLexer(variant="", parent=None): # noqa: U100 134 def createLexer(variant="", parent=None): # noqa: U100

eric ide

mercurial