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