10 from PyQt4.Qsci import QsciLexerBash |
10 from PyQt4.Qsci import QsciLexerBash |
11 |
11 |
12 from .Lexer import Lexer |
12 from .Lexer import Lexer |
13 import Preferences |
13 import Preferences |
14 |
14 |
|
15 |
15 class LexerBash(QsciLexerBash, Lexer): |
16 class LexerBash(QsciLexerBash, 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 |
22 |
23 |
23 @param parent parent widget of this lexer |
24 @param parent parent widget of this lexer |
24 """ |
25 """ |
46 """ |
47 """ |
47 Public method to check, if a style is a string style. |
48 Public method to check, if a style is a string style. |
48 |
49 |
49 @return flag indicating a string style (boolean) |
50 @return flag indicating a string style (boolean) |
50 """ |
51 """ |
51 return style in [QsciLexerBash.DoubleQuotedString, |
52 return style in [QsciLexerBash.DoubleQuotedString, |
52 QsciLexerBash.SingleQuotedString, |
53 QsciLexerBash.SingleQuotedString, |
53 QsciLexerBash.SingleQuotedHereDocument] |
54 QsciLexerBash.SingleQuotedHereDocument] |
54 |
55 |
55 def defaultKeywords(self, kwSet): |
56 def defaultKeywords(self, kwSet): |
56 """ |
57 """ |
57 Public method to get the default keywords. |
58 Public method to get the default keywords. |
58 |
59 |
59 @param kwSet number of the keyword set (integer) |
60 @param kwSet number of the keyword set (integer) |
60 @return string giving the keywords (string) or None |
61 @return string giving the keywords (string) or None |
61 """ |
62 """ |
62 return QsciLexerBash.keywords(self, kwSet) |
63 return QsciLexerBash.keywords(self, kwSet) |