src/eric7/QScintilla/Lexers/LexerBatch.py

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

eric ide

mercurial