10 from PyQt4.Qsci import QsciLexerFortran |
10 from PyQt4.Qsci import QsciLexerFortran |
11 |
11 |
12 from .Lexer import Lexer |
12 from .Lexer import Lexer |
13 import Preferences |
13 import Preferences |
14 |
14 |
|
15 |
15 class LexerFortran(QsciLexerFortran, Lexer): |
16 class LexerFortran(QsciLexerFortran, 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 """ |
53 """ |
54 """ |
54 Public method to check, if a style is a string style. |
55 Public method to check, if a style is a string style. |
55 |
56 |
56 @return flag indicating a string style (boolean) |
57 @return flag indicating a string style (boolean) |
57 """ |
58 """ |
58 return style in [QsciLexerFortran.DoubleQuotedString, |
59 return style in [QsciLexerFortran.DoubleQuotedString, |
59 QsciLexerFortran.SingleQuotedString, |
60 QsciLexerFortran.SingleQuotedString, |
60 QsciLexerFortran.UnclosedString] |
61 QsciLexerFortran.UnclosedString] |
61 |
62 |
62 def defaultKeywords(self, kwSet): |
63 def defaultKeywords(self, kwSet): |
63 """ |
64 """ |
64 Public method to get the default keywords. |
65 Public method to get the default keywords. |
65 |
66 |
66 @param kwSet number of the keyword set (integer) |
67 @param kwSet number of the keyword set (integer) |
67 @return string giving the keywords (string) or None |
68 @return string giving the keywords (string) or None |
68 """ |
69 """ |
69 return QsciLexerFortran.keywords(self, kwSet) |
70 return QsciLexerFortran.keywords(self, kwSet) |