24 def __init__(self, parent=None): |
24 def __init__(self, parent=None): |
25 """ |
25 """ |
26 Constructor |
26 Constructor |
27 |
27 |
28 @param parent parent widget of this lexer |
28 @param parent parent widget of this lexer |
|
29 @type QWidget |
29 """ |
30 """ |
30 QsciLexerPascal.__init__(self, parent) |
31 QsciLexerPascal.__init__(self, parent) |
31 Lexer.__init__(self) |
32 Lexer.__init__(self) |
32 |
33 |
33 self.commentString = "//" |
34 self.commentString = "//" |
49 |
50 |
50 def autoCompletionWordSeparators(self): |
51 def autoCompletionWordSeparators(self): |
51 """ |
52 """ |
52 Public method to return the list of separators for autocompletion. |
53 Public method to return the list of separators for autocompletion. |
53 |
54 |
54 @return list of separators (list of strings) |
55 @return list of separators |
|
56 @rtype list of str |
55 """ |
57 """ |
56 return ["."] |
58 return ["."] |
57 |
59 |
58 def isCommentStyle(self, style): |
60 def isCommentStyle(self, style): |
59 """ |
61 """ |
60 Public method to check, if a style is a comment style. |
62 Public method to check, if a style is a comment style. |
61 |
63 |
62 @param style style to check (integer) |
64 @param style style to check |
63 @return flag indicating a comment style (boolean) |
65 @type int |
|
66 @return flag indicating a comment style |
|
67 @rtype bool |
64 """ |
68 """ |
65 try: |
69 try: |
66 return style in [ |
70 return style in [ |
67 QsciLexerPascal.Comment, |
71 QsciLexerPascal.Comment, |
68 QsciLexerPascal.CommentDoc, |
72 QsciLexerPascal.CommentDoc, |
77 |
81 |
78 def isStringStyle(self, style): |
82 def isStringStyle(self, style): |
79 """ |
83 """ |
80 Public method to check, if a style is a string style. |
84 Public method to check, if a style is a string style. |
81 |
85 |
82 @param style style to check (integer) |
86 @param style style to check |
83 @return flag indicating a string style (boolean) |
87 @type int |
|
88 @return flag indicating a string style |
|
89 @rtype bool |
84 """ |
90 """ |
85 return style in [QsciLexerPascal.SingleQuotedString] |
91 return style in [QsciLexerPascal.SingleQuotedString] |
86 |
92 |
87 def defaultKeywords(self, kwSet): |
93 def defaultKeywords(self, kwSet): |
88 """ |
94 """ |
89 Public method to get the default keywords. |
95 Public method to get the default keywords. |
90 |
96 |
91 @param kwSet number of the keyword set (integer) |
97 @param kwSet number of the keyword set |
92 @return string giving the keywords (string) or None |
98 @type int |
|
99 @return string giving the keywords or None |
|
100 @rtype str |
93 """ |
101 """ |
94 return QsciLexerPascal.keywords(self, kwSet) |
102 return QsciLexerPascal.keywords(self, kwSet) |
95 |
103 |
96 |
104 |
97 def createLexer(variant="", parent=None): # noqa: U100 |
105 def createLexer(variant="", parent=None): # noqa: U100 |