src/eric7/QScintilla/Lexers/LexerRuby.py

branch
eric7
changeset 10431
64157aeb0312
parent 10069
435cc5875135
child 10439
21c28b0f9e41
equal deleted inserted replaced
10430:e440aaf179ce 10431:64157aeb0312
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 QsciLexerRuby.__init__(self, parent) 31 QsciLexerRuby.__init__(self, parent)
31 Lexer.__init__(self) 32 Lexer.__init__(self)
32 33
33 self.commentString = "#" 34 self.commentString = "#"
46 47
47 def autoCompletionWordSeparators(self): 48 def autoCompletionWordSeparators(self):
48 """ 49 """
49 Public method to return the list of separators for autocompletion. 50 Public method to return the list of separators for autocompletion.
50 51
51 @return list of separators (list of strings) 52 @return list of separators
53 @rtype list of str
52 """ 54 """
53 return ["."] 55 return ["."]
54 56
55 def isCommentStyle(self, style): 57 def isCommentStyle(self, style):
56 """ 58 """
57 Public method to check, if a style is a comment style. 59 Public method to check, if a style is a comment style.
58 60
59 @param style style to check (integer) 61 @param style style to check
60 @return flag indicating a comment style (boolean) 62 @type int
63 @return flag indicating a comment style
64 @rtype bool
61 """ 65 """
62 return style in [QsciLexerRuby.Comment] 66 return style in [QsciLexerRuby.Comment]
63 67
64 def isStringStyle(self, style): 68 def isStringStyle(self, style):
65 """ 69 """
66 Public method to check, if a style is a string style. 70 Public method to check, if a style is a string style.
67 71
68 @param style style to check (integer) 72 @param style style to check
69 @return flag indicating a string style (boolean) 73 @type int
74 @return flag indicating a string style
75 @rtype bool
70 """ 76 """
71 return style in [ 77 return style in [
72 QsciLexerRuby.DoubleQuotedString, 78 QsciLexerRuby.DoubleQuotedString,
73 QsciLexerRuby.HereDocument, 79 QsciLexerRuby.HereDocument,
74 QsciLexerRuby.PercentStringQ, 80 QsciLexerRuby.PercentStringQ,
81 87
82 def defaultKeywords(self, kwSet): 88 def defaultKeywords(self, kwSet):
83 """ 89 """
84 Public method to get the default keywords. 90 Public method to get the default keywords.
85 91
86 @param kwSet number of the keyword set (integer) 92 @param kwSet number of the keyword set
87 @return string giving the keywords (string) or None 93 @type int
94 @return string giving the keywords or None
95 @rtype str
88 """ 96 """
89 return QsciLexerRuby.keywords(self, kwSet) 97 return QsciLexerRuby.keywords(self, kwSet)
90 98
91 99
92 def createLexer(variant="", parent=None): # noqa: U100 100 def createLexer(variant="", parent=None): # noqa: U100

eric ide

mercurial