10 from PyQt4.Qsci import QsciLexerPerl |
10 from PyQt4.Qsci import QsciLexerPerl |
11 |
11 |
12 from .Lexer import Lexer |
12 from .Lexer import Lexer |
13 import Preferences |
13 import Preferences |
14 |
14 |
|
15 |
15 class LexerPerl(QsciLexerPerl, Lexer): |
16 class LexerPerl(QsciLexerPerl, Lexer): |
16 """ |
17 """ |
17 Subclass to implement some additional lexer dependant methods. |
18 Subclass to implement some additional lexer dependant methods. |
18 """ |
19 """ |
19 def __init__(self, parent=None): |
20 def __init__(self, parent=None): |
20 """ |
21 """ |
21 Constructor |
22 Constructor |
59 """ |
60 """ |
60 Public method to check, if a style is a string style. |
61 Public method to check, if a style is a string style. |
61 |
62 |
62 @return flag indicating a string style (boolean) |
63 @return flag indicating a string style (boolean) |
63 """ |
64 """ |
64 return style in [QsciLexerPerl.DoubleQuotedHereDocument, |
65 return style in [QsciLexerPerl.DoubleQuotedHereDocument, |
65 QsciLexerPerl.DoubleQuotedString, |
66 QsciLexerPerl.DoubleQuotedString, |
66 QsciLexerPerl.QuotedStringQ, |
67 QsciLexerPerl.QuotedStringQ, |
67 QsciLexerPerl.QuotedStringQQ, |
68 QsciLexerPerl.QuotedStringQQ, |
68 QsciLexerPerl.QuotedStringQR, |
69 QsciLexerPerl.QuotedStringQR, |
69 QsciLexerPerl.QuotedStringQW, |
70 QsciLexerPerl.QuotedStringQW, |
70 QsciLexerPerl.QuotedStringQX, |
71 QsciLexerPerl.QuotedStringQX, |
71 QsciLexerPerl.SingleQuotedHereDocument, |
72 QsciLexerPerl.SingleQuotedHereDocument, |
72 QsciLexerPerl.SingleQuotedString] |
73 QsciLexerPerl.SingleQuotedString] |
73 |
74 |
74 def defaultKeywords(self, kwSet): |
75 def defaultKeywords(self, kwSet): |
75 """ |
76 """ |
76 Public method to get the default keywords. |
77 Public method to get the default keywords. |
77 |
78 |
78 @param kwSet number of the keyword set (integer) |
79 @param kwSet number of the keyword set (integer) |
79 @return string giving the keywords (string) or None |
80 @return string giving the keywords (string) or None |
80 """ |
81 """ |
81 return QsciLexerPerl.keywords(self, kwSet) |
82 return QsciLexerPerl.keywords(self, kwSet) |