QScintilla/Lexers/LexerPascal.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3011
18292228c724
child 3145
a9de05d4a22f
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
37 def initProperties(self): 37 def initProperties(self):
38 """ 38 """
39 Public slot to initialize the properties. 39 Public slot to initialize the properties.
40 """ 40 """
41 self.setFoldComments(Preferences.getEditor("PascalFoldComment")) 41 self.setFoldComments(Preferences.getEditor("PascalFoldComment"))
42 self.setFoldPreprocessor(Preferences.getEditor("PascalFoldPreprocessor")) 42 self.setFoldPreprocessor(
43 Preferences.getEditor("PascalFoldPreprocessor"))
43 self.setFoldCompact(Preferences.getEditor("AllFoldCompact")) 44 self.setFoldCompact(Preferences.getEditor("AllFoldCompact"))
44 try: 45 try:
45 self.setSmartHighlighting(Preferences.getEditor("PascalSmartHighlighting")) 46 self.setSmartHighlighting(
47 Preferences.getEditor("PascalSmartHighlighting"))
46 except AttributeError: 48 except AttributeError:
47 pass 49 pass
48 50
49 def autoCompletionWordSeparators(self): 51 def autoCompletionWordSeparators(self):
50 """ 52 """
56 58
57 def isCommentStyle(self, style): 59 def isCommentStyle(self, style):
58 """ 60 """
59 Public method to check, if a style is a comment style. 61 Public method to check, if a style is a comment style.
60 62
63 @param style style to check (integer)
61 @return flag indicating a comment style (boolean) 64 @return flag indicating a comment style (boolean)
62 """ 65 """
63 try: 66 try:
64 return style in [QsciLexerPascal.Comment, 67 return style in [QsciLexerPascal.Comment,
65 QsciLexerPascal.CommentDoc, 68 QsciLexerPascal.CommentDoc,
71 74
72 def isStringStyle(self, style): 75 def isStringStyle(self, style):
73 """ 76 """
74 Public method to check, if a style is a string style. 77 Public method to check, if a style is a string style.
75 78
79 @param style style to check (integer)
76 @return flag indicating a string style (boolean) 80 @return flag indicating a string style (boolean)
77 """ 81 """
78 return style in [QsciLexerPascal.SingleQuotedString] 82 return style in [QsciLexerPascal.SingleQuotedString]
79 83
80 def defaultKeywords(self, kwSet): 84 def defaultKeywords(self, kwSet):

eric ide

mercurial