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 QsciLexerPerl.__init__(self, parent) |
31 QsciLexerPerl.__init__(self, parent) |
31 Lexer.__init__(self) |
32 Lexer.__init__(self) |
32 |
33 |
33 self.commentString = "#" |
34 self.commentString = "#" |
50 |
51 |
51 def autoCompletionWordSeparators(self): |
52 def autoCompletionWordSeparators(self): |
52 """ |
53 """ |
53 Public method to return the list of separators for autocompletion. |
54 Public method to return the list of separators for autocompletion. |
54 |
55 |
55 @return list of separators (list of strings) |
56 @return list of separators |
|
57 @rtype list of str |
56 """ |
58 """ |
57 return ["::", "->"] |
59 return ["::", "->"] |
58 |
60 |
59 def isCommentStyle(self, style): |
61 def isCommentStyle(self, style): |
60 """ |
62 """ |
61 Public method to check, if a style is a comment style. |
63 Public method to check, if a style is a comment style. |
62 |
64 |
63 @param style style to check (integer) |
65 @param style style to check |
64 @return flag indicating a comment style (boolean) |
66 @type int |
|
67 @return flag indicating a comment style |
|
68 @rtype bool |
65 """ |
69 """ |
66 return style in [QsciLexerPerl.Comment] |
70 return style in [QsciLexerPerl.Comment] |
67 |
71 |
68 def isStringStyle(self, style): |
72 def isStringStyle(self, style): |
69 """ |
73 """ |
70 Public method to check, if a style is a string style. |
74 Public method to check, if a style is a string style. |
71 |
75 |
72 @param style style to check (integer) |
76 @param style style to check |
73 @return flag indicating a string style (boolean) |
77 @type int |
|
78 @return flag indicating a string style |
|
79 @rtype bool |
74 """ |
80 """ |
75 return style in [ |
81 return style in [ |
76 QsciLexerPerl.DoubleQuotedHereDocument, |
82 QsciLexerPerl.DoubleQuotedHereDocument, |
77 QsciLexerPerl.DoubleQuotedString, |
83 QsciLexerPerl.DoubleQuotedString, |
78 QsciLexerPerl.QuotedStringQ, |
84 QsciLexerPerl.QuotedStringQ, |
86 |
92 |
87 def defaultKeywords(self, kwSet): |
93 def defaultKeywords(self, kwSet): |
88 """ |
94 """ |
89 Public method to get the default keywords. |
95 Public method to get the default keywords. |
90 |
96 |
91 @param kwSet number of the keyword set (integer) |
97 @param kwSet number of the keyword set |
92 @return string giving the keywords (string) or None |
98 @type int |
|
99 @return string giving the keywords or None |
|
100 @rtype str |
93 """ |
101 """ |
94 return QsciLexerPerl.keywords(self, kwSet) |
102 return QsciLexerPerl.keywords(self, kwSet) |
95 |
103 |
96 |
104 |
97 def createLexer(variant="", parent=None): # noqa: U100 |
105 def createLexer(variant="", parent=None): # noqa: U100 |