11 |
11 |
12 from .Lexer import Lexer |
12 from .Lexer import Lexer |
13 |
13 |
14 import Preferences |
14 import Preferences |
15 |
15 |
|
16 |
16 class LexerTCL(QsciLexerTCL, Lexer): |
17 class LexerTCL(QsciLexerTCL, Lexer): |
17 """ |
18 """ |
18 Subclass to implement some additional lexer dependant methods. |
19 Subclass to implement some additional lexer dependant methods. |
19 """ |
20 """ |
20 def __init__(self, parent=None): |
21 def __init__(self, parent=None): |
21 """ |
22 """ |
22 Constructor |
23 Constructor |
38 """ |
39 """ |
39 Public method to check, if a style is a comment style. |
40 Public method to check, if a style is a comment style. |
40 |
41 |
41 @return flag indicating a comment style (boolean) |
42 @return flag indicating a comment style (boolean) |
42 """ |
43 """ |
43 return style in [QsciLexerTCL.Comment, |
44 return style in [QsciLexerTCL.Comment, |
44 QsciLexerTCL.CommentBlock, |
45 QsciLexerTCL.CommentBlock, |
45 QsciLexerTCL.CommentBox, |
46 QsciLexerTCL.CommentBox, |
46 QsciLexerTCL.CommentLine] |
47 QsciLexerTCL.CommentLine] |
47 |
48 |
48 def isStringStyle(self, style): |
49 def isStringStyle(self, style): |
49 """ |
50 """ |
50 Public method to check, if a style is a string style. |
51 Public method to check, if a style is a string style. |
55 |
56 |
56 def defaultKeywords(self, kwSet): |
57 def defaultKeywords(self, kwSet): |
57 """ |
58 """ |
58 Public method to get the default keywords. |
59 Public method to get the default keywords. |
59 |
60 |
60 @param kwSet number of the keyword set (integer) |
61 @param kwSet number of the keyword set (integer) |
61 @return string giving the keywords (string) or None |
62 @return string giving the keywords (string) or None |
62 """ |
63 """ |
63 return QsciLexerTCL.keywords(self, kwSet) |
64 return QsciLexerTCL.keywords(self, kwSet) |