src/eric7/QScintilla/Lexers/LexerLua.py

branch
eric7
changeset 10431
64157aeb0312
parent 10069
435cc5875135
child 10439
21c28b0f9e41
equal deleted inserted replaced
10430:e440aaf179ce 10431:64157aeb0312
22 def __init__(self, parent=None): 22 def __init__(self, parent=None):
23 """ 23 """
24 Constructor 24 Constructor
25 25
26 @param parent parent widget of this lexer 26 @param parent parent widget of this lexer
27 @type QWidget
27 """ 28 """
28 QsciLexerLua.__init__(self, parent) 29 QsciLexerLua.__init__(self, parent)
29 Lexer.__init__(self) 30 Lexer.__init__(self)
30 31
31 self.commentString = "--" 32 self.commentString = "--"
50 51
51 def autoCompletionWordSeparators(self): 52 def autoCompletionWordSeparators(self):
52 """ 53 """
53 Public method to return the list of separators for autocompletion. 54 Public method to return the list of separators for autocompletion.
54 55
55 @return list of separators (list of strings) 56 @return list of separators
57 @rtype list of str
56 """ 58 """
57 return [":", "."] 59 return [":", "."]
58 60
59 def isCommentStyle(self, style): 61 def isCommentStyle(self, style):
60 """ 62 """
61 Public method to check, if a style is a comment style. 63 Public method to check, if a style is a comment style.
62 64
63 @param style style to check (integer) 65 @param style style to check
64 @return flag indicating a comment style (boolean) 66 @type int
67 @return flag indicating a comment style
68 @rtype bool
65 """ 69 """
66 return style in [QsciLexerLua.Comment, QsciLexerLua.LineComment] 70 return style in [QsciLexerLua.Comment, QsciLexerLua.LineComment]
67 71
68 def isStringStyle(self, style): 72 def isStringStyle(self, style):
69 """ 73 """
70 Public method to check, if a style is a string style. 74 Public method to check, if a style is a string style.
71 75
72 @param style style to check (integer) 76 @param style style to check
73 @return flag indicating a string style (boolean) 77 @type int
78 @return flag indicating a string style
79 @rtype bool
74 """ 80 """
75 return style in [ 81 return style in [
76 QsciLexerLua.String, 82 QsciLexerLua.String,
77 QsciLexerLua.LiteralString, 83 QsciLexerLua.LiteralString,
78 QsciLexerLua.UnclosedString, 84 QsciLexerLua.UnclosedString,
80 86
81 def defaultKeywords(self, kwSet): 87 def defaultKeywords(self, kwSet):
82 """ 88 """
83 Public method to get the default keywords. 89 Public method to get the default keywords.
84 90
85 @param kwSet number of the keyword set (integer) 91 @param kwSet number of the keyword set
86 @return string giving the keywords (string) or None 92 @type int
93 @return string giving the keywords or None
94 @rtype str
87 """ 95 """
88 return QsciLexerLua.keywords(self, kwSet) 96 return QsciLexerLua.keywords(self, kwSet)
89 97
90 def maximumKeywordSet(self): 98 def maximumKeywordSet(self):
91 """ 99 """
92 Public method to get the maximum keyword set. 100 Public method to get the maximum keyword set.
93 101
94 @return maximum keyword set (integer) 102 @return maximum keyword set
103 @rtype int
95 """ 104 """
96 return 8 105 return 8
97 106
98 107
99 def createLexer(variant="", parent=None): # noqa: U100 108 def createLexer(variant="", parent=None): # noqa: U100

eric ide

mercurial