10 from PyQt4.Qsci import QsciLexerVHDL |
10 from PyQt4.Qsci import QsciLexerVHDL |
11 |
11 |
12 from .Lexer import Lexer |
12 from .Lexer import Lexer |
13 import Preferences |
13 import Preferences |
14 |
14 |
|
15 |
15 class LexerVHDL(QsciLexerVHDL, Lexer): |
16 class LexerVHDL(QsciLexerVHDL, 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 |
42 """ |
43 """ |
43 Public method to check, if a style is a comment style. |
44 Public method to check, if a style is a comment style. |
44 |
45 |
45 @return flag indicating a comment style (boolean) |
46 @return flag indicating a comment style (boolean) |
46 """ |
47 """ |
47 return style in [QsciLexerVHDL.Comment, |
48 return style in [QsciLexerVHDL.Comment, |
48 QsciLexerVHDL.CommentLine] |
49 QsciLexerVHDL.CommentLine] |
49 |
50 |
50 def isStringStyle(self, style): |
51 def isStringStyle(self, style): |
51 """ |
52 """ |
52 Public method to check, if a style is a string style. |
53 Public method to check, if a style is a string style. |
53 |
54 |
54 @return flag indicating a string style (boolean) |
55 @return flag indicating a string style (boolean) |
55 """ |
56 """ |
56 return style in [QsciLexerVHDL.String, |
57 return style in [QsciLexerVHDL.String, |
57 QsciLexerVHDL.UnclosedString] |
58 QsciLexerVHDL.UnclosedString] |
58 |
59 |
59 def defaultKeywords(self, kwSet): |
60 def defaultKeywords(self, kwSet): |
60 """ |
61 """ |
61 Public method to get the default keywords. |
62 Public method to get the default keywords. |
62 |
63 |
63 @param kwSet number of the keyword set (integer) |
64 @param kwSet number of the keyword set (integer) |
64 @return string giving the keywords (string) or None |
65 @return string giving the keywords (string) or None |
65 """ |
66 """ |
66 return QsciLexerVHDL.keywords(self, kwSet) |
67 return QsciLexerVHDL.keywords(self, kwSet) |