22 def __init__(self, parent=None): |
22 def __init__(self, parent=None): |
23 """ |
23 """ |
24 Constructor |
24 Constructor |
25 |
25 |
26 @param parent parent widget of this lexer |
26 @param parent parent widget of this lexer |
|
27 @type QWidget |
27 """ |
28 """ |
28 QsciLexerJSON.__init__(self, parent) |
29 QsciLexerJSON.__init__(self, parent) |
29 Lexer.__init__(self) |
30 Lexer.__init__(self) |
30 |
31 |
31 self.commentString = "//" |
32 self.commentString = "//" |
48 |
49 |
49 def isCommentStyle(self, style): |
50 def isCommentStyle(self, style): |
50 """ |
51 """ |
51 Public method to check, if a style is a comment style. |
52 Public method to check, if a style is a comment style. |
52 |
53 |
53 @param style style to check (integer) |
54 @param style style to check |
54 @return flag indicating a comment style (boolean) |
55 @type int |
|
56 @return flag indicating a comment style |
|
57 @rtype bool |
55 """ |
58 """ |
56 return style in [QsciLexerJSON.CommentLine, QsciLexerJSON.CommentBlock] |
59 return style in [QsciLexerJSON.CommentLine, QsciLexerJSON.CommentBlock] |
57 |
60 |
58 def isStringStyle(self, style): |
61 def isStringStyle(self, style): |
59 """ |
62 """ |
60 Public method to check, if a style is a string style. |
63 Public method to check, if a style is a string style. |
61 |
64 |
62 @param style style to check (integer) |
65 @param style style to check |
63 @return flag indicating a string style (boolean) |
66 @type int |
|
67 @return flag indicating a string style |
|
68 @rtype bool |
64 """ |
69 """ |
65 return style in [QsciLexerJSON.String, QsciLexerJSON.UnclosedString] |
70 return style in [QsciLexerJSON.String, QsciLexerJSON.UnclosedString] |
66 |
71 |
67 def defaultKeywords(self, kwSet): |
72 def defaultKeywords(self, kwSet): |
68 """ |
73 """ |
69 Public method to get the default keywords. |
74 Public method to get the default keywords. |
70 |
75 |
71 @param kwSet number of the keyword set (integer) |
76 @param kwSet number of the keyword set |
72 @return string giving the keywords (string) or None |
77 @type int |
|
78 @return string giving the keywords or None |
|
79 @rtype str |
73 """ |
80 """ |
74 return QsciLexerJSON.keywords(self, kwSet) |
81 return QsciLexerJSON.keywords(self, kwSet) |
75 |
82 |
76 def maximumKeywordSet(self): |
83 def maximumKeywordSet(self): |
77 """ |
84 """ |
78 Public method to get the maximum keyword set. |
85 Public method to get the maximum keyword set. |
79 |
86 |
80 @return maximum keyword set (integer) |
87 @return maximum keyword set |
|
88 @rtype int |
81 """ |
89 """ |
82 return 2 |
90 return 2 |
83 |
91 |
84 |
92 |
85 def createLexer(variant="", parent=None): # noqa: U100 |
93 def createLexer(variant="", parent=None): # noqa: U100 |