src/eric7/QScintilla/Lexers/LexerOctave.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9484
d2eb8f0a5bf0
equal deleted inserted replaced
9220:e9e7eca7efee 9221:bf71ee032bb4
14 14
15 class LexerOctave(Lexer, QsciLexerOctave): 15 class LexerOctave(Lexer, QsciLexerOctave):
16 """ 16 """
17 Subclass to implement some additional lexer dependent methods. 17 Subclass to implement some additional lexer dependent methods.
18 """ 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 """
25 QsciLexerOctave.__init__(self, parent) 26 QsciLexerOctave.__init__(self, parent)
26 Lexer.__init__(self) 27 Lexer.__init__(self)
27 28
28 self.commentString = "#" 29 self.commentString = "#"
29 30
30 self.keywordSetDescriptions = [ 31 self.keywordSetDescriptions = [
31 self.tr("Keywords"), 32 self.tr("Keywords"),
32 ] 33 ]
33 34
34 def isCommentStyle(self, style): 35 def isCommentStyle(self, style):
35 """ 36 """
36 Public method to check, if a style is a comment style. 37 Public method to check, if a style is a comment style.
37 38
38 @param style style to check (integer) 39 @param style style to check (integer)
39 @return flag indicating a comment style (boolean) 40 @return flag indicating a comment style (boolean)
40 """ 41 """
41 return style in [QsciLexerOctave.Comment] 42 return style in [QsciLexerOctave.Comment]
42 43
43 def isStringStyle(self, style): 44 def isStringStyle(self, style):
44 """ 45 """
45 Public method to check, if a style is a string style. 46 Public method to check, if a style is a string style.
46 47
47 @param style style to check (integer) 48 @param style style to check (integer)
48 @return flag indicating a string style (boolean) 49 @return flag indicating a string style (boolean)
49 """ 50 """
50 return style in [QsciLexerOctave.DoubleQuotedString, 51 return style in [
51 QsciLexerOctave.SingleQuotedString] 52 QsciLexerOctave.DoubleQuotedString,
52 53 QsciLexerOctave.SingleQuotedString,
54 ]
55
53 def defaultKeywords(self, kwSet): 56 def defaultKeywords(self, kwSet):
54 """ 57 """
55 Public method to get the default keywords. 58 Public method to get the default keywords.
56 59
57 @param kwSet number of the keyword set (integer) 60 @param kwSet number of the keyword set (integer)
58 @return string giving the keywords (string) or None 61 @return string giving the keywords (string) or None
59 """ 62 """
60 return QsciLexerOctave.keywords(self, kwSet) 63 return QsciLexerOctave.keywords(self, kwSet)

eric ide

mercurial