QScintilla/Lexers/LexerSQL.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3011
18292228c724
child 3145
a9de05d4a22f
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
40 try: 40 try:
41 self.setDottedWords(Preferences.getEditor("SqlDottedWords")) 41 self.setDottedWords(Preferences.getEditor("SqlDottedWords"))
42 self.setFoldAtElse(Preferences.getEditor("SqlFoldAtElse")) 42 self.setFoldAtElse(Preferences.getEditor("SqlFoldAtElse"))
43 self.setFoldOnlyBegin(Preferences.getEditor("SqlFoldOnlyBegin")) 43 self.setFoldOnlyBegin(Preferences.getEditor("SqlFoldOnlyBegin"))
44 self.setHashComments(Preferences.getEditor("SqlHashComments")) 44 self.setHashComments(Preferences.getEditor("SqlHashComments"))
45 self.setQuotedIdentifiers(Preferences.getEditor("SqlQuotedIdentifiers")) 45 self.setQuotedIdentifiers(
46 Preferences.getEditor("SqlQuotedIdentifiers"))
46 except AttributeError: 47 except AttributeError:
47 pass 48 pass
48 49
49 def isCommentStyle(self, style): 50 def isCommentStyle(self, style):
50 """ 51 """
51 Public method to check, if a style is a comment style. 52 Public method to check, if a style is a comment style.
52 53
54 @param style style to check (integer)
53 @return flag indicating a comment style (boolean) 55 @return flag indicating a comment style (boolean)
54 """ 56 """
55 return style in [QsciLexerSQL.Comment, 57 return style in [QsciLexerSQL.Comment,
56 QsciLexerSQL.CommentDoc, 58 QsciLexerSQL.CommentDoc,
57 QsciLexerSQL.CommentLine, 59 QsciLexerSQL.CommentLine,
59 61
60 def isStringStyle(self, style): 62 def isStringStyle(self, style):
61 """ 63 """
62 Public method to check, if a style is a string style. 64 Public method to check, if a style is a string style.
63 65
66 @param style style to check (integer)
64 @return flag indicating a string style (boolean) 67 @return flag indicating a string style (boolean)
65 """ 68 """
66 return style in [QsciLexerSQL.DoubleQuotedString, 69 return style in [QsciLexerSQL.DoubleQuotedString,
67 QsciLexerSQL.SingleQuotedString] 70 QsciLexerSQL.SingleQuotedString]
68 71

eric ide

mercurial