src/eric7/QScintilla/Lexers/LexerSQL.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 QsciLexerSQL.__init__(self, parent) 31 QsciLexerSQL.__init__(self, parent)
31 Lexer.__init__(self) 32 Lexer.__init__(self)
32 33
33 self.commentString = "--" 34 self.commentString = "--"
59 60
60 def isCommentStyle(self, style): 61 def isCommentStyle(self, style):
61 """ 62 """
62 Public method to check, if a style is a comment style. 63 Public method to check, if a style is a comment style.
63 64
64 @param style style to check (integer) 65 @param style style to check
65 @return flag indicating a comment style (boolean) 66 @type int
67 @return flag indicating a comment style
68 @rtype bool
66 """ 69 """
67 return style in [ 70 return style in [
68 QsciLexerSQL.Comment, 71 QsciLexerSQL.Comment,
69 QsciLexerSQL.CommentDoc, 72 QsciLexerSQL.CommentDoc,
70 QsciLexerSQL.CommentLine, 73 QsciLexerSQL.CommentLine,
73 76
74 def isStringStyle(self, style): 77 def isStringStyle(self, style):
75 """ 78 """
76 Public method to check, if a style is a string style. 79 Public method to check, if a style is a string style.
77 80
78 @param style style to check (integer) 81 @param style style to check
79 @return flag indicating a string style (boolean) 82 @type int
83 @return flag indicating a string style
84 @rtype bool
80 """ 85 """
81 return style in [ 86 return style in [
82 QsciLexerSQL.DoubleQuotedString, 87 QsciLexerSQL.DoubleQuotedString,
83 QsciLexerSQL.SingleQuotedString, 88 QsciLexerSQL.SingleQuotedString,
84 ] 89 ]
85 90
86 def defaultKeywords(self, kwSet): 91 def defaultKeywords(self, kwSet):
87 """ 92 """
88 Public method to get the default keywords. 93 Public method to get the default keywords.
89 94
90 @param kwSet number of the keyword set (integer) 95 @param kwSet number of the keyword set
91 @return string giving the keywords (string) or None 96 @type int
97 @return string giving the keywords or None
98 @rtype str
92 """ 99 """
93 return QsciLexerSQL.keywords(self, kwSet) 100 return QsciLexerSQL.keywords(self, kwSet)
94 101
95 def maximumKeywordSet(self): 102 def maximumKeywordSet(self):
96 """ 103 """
97 Public method to get the maximum keyword set. 104 Public method to get the maximum keyword set.
98 105
99 @return maximum keyword set (integer) 106 @return maximum keyword set
107 @rtype int
100 """ 108 """
101 return 8 109 return 8
102 110
103 111
104 def createLexer(variant="", parent=None): # noqa: U100 112 def createLexer(variant="", parent=None): # noqa: U100

eric ide

mercurial