eric6/QScintilla/Lexers/LexerPascal.py

changeset 8243
cc717c2ae956
parent 7923
91e843545d9a
equal deleted inserted replaced
8242:aa713ac50c0d 8243:cc717c2ae956
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a Pascal lexer with some additional methods. 7 Module implementing a Pascal lexer with some additional methods.
8 """ 8 """
9
10 import contextlib
9 11
10 from PyQt5.Qsci import QsciLexerPascal 12 from PyQt5.Qsci import QsciLexerPascal
11 13
12 from .Lexer import Lexer 14 from .Lexer import Lexer
13 import Preferences 15 import Preferences
42 """ 44 """
43 self.setFoldComments(Preferences.getEditor("PascalFoldComment")) 45 self.setFoldComments(Preferences.getEditor("PascalFoldComment"))
44 self.setFoldPreprocessor( 46 self.setFoldPreprocessor(
45 Preferences.getEditor("PascalFoldPreprocessor")) 47 Preferences.getEditor("PascalFoldPreprocessor"))
46 self.setFoldCompact(Preferences.getEditor("AllFoldCompact")) 48 self.setFoldCompact(Preferences.getEditor("AllFoldCompact"))
47 try: 49 with contextlib.suppress(AttributeError):
48 self.setSmartHighlighting( 50 self.setSmartHighlighting(
49 Preferences.getEditor("PascalSmartHighlighting")) 51 Preferences.getEditor("PascalSmartHighlighting"))
50 except AttributeError:
51 pass
52 52
53 def autoCompletionWordSeparators(self): 53 def autoCompletionWordSeparators(self):
54 """ 54 """
55 Public method to return the list of separators for autocompletion. 55 Public method to return the list of separators for autocompletion.
56 56

eric ide

mercurial