QScintilla/Lexers/LexerPython.py

branch
sub_styles
changeset 6846
6ca9ef2c0907
parent 6845
4680adb641e0
child 6855
4d80c8cc99a1
equal deleted inserted replaced
6845:4680adb641e0 6846:6ca9ef2c0907
41 41
42 # list of style numbers, that support sub-styling 42 # list of style numbers, that support sub-styling
43 self.baseStyles = [11] 43 self.baseStyles = [11]
44 44
45 self.defaultSubStyles = { 45 self.defaultSubStyles = {
46 11: { 46 11: [
47 "SubStyleLength": 2, 47 {
48 "SubStyles": [ 48 "Description": QCoreApplication.translate(
49 { 49 "LexerPython", "Standard Library Modules"),
50 "Description": QCoreApplication.translate( 50 "Words": """
51 "LexerPython", "Standard Library Modules"),
52 "Words": """
53 __main__ _dummy_thread _thread abc aifc argparse array ast asynchat asyncio 51 __main__ _dummy_thread _thread abc aifc argparse array ast asynchat asyncio
54 asyncore atexit audioop base64 bdb binascii binhex bisect builtins bz2 52 asyncore atexit audioop base64 bdb binascii binhex bisect builtins bz2
55 calendar cgi cgitb chunk cmath cmd code codecs codeop collections colorsys 53 calendar cgi cgitb chunk cmath cmd code codecs codeop collections colorsys
56 compileall concurrent configparser contextlib copy copyreg crypt csv ctypes 54 compileall concurrent configparser contextlib copy copyreg crypt csv ctypes
57 curses datetime dbm decimal difflib dis distutils dummy_threading email 55 curses datetime dbm decimal difflib dis distutils dummy_threading email
58 ensurepip enum errno faulthandler fcntl filecmp fileinput fnmatch formatter 56 ensurepip enum errno faulthandler fcntl filecmp fileinput fnmatch formatter
59 fpectl fractions ftplib functools gc getopt getpass gettext glob grp gzip 57 fpectl fractions ftplib functools gc getopt getpass gettext glob grp gzip
60 hashlib heapq hmac html http http imaplib imghdr importlib inspect io 58 hashlib heapq hmac html http http imaplib imghdr importlib inspect io
61 ipaddress itertools json keyword linecache locale logging lzma macpath 59 ipaddress itertools json keyword linecache locale logging lzma macpath
62 mailbox mailcap marshal math mimetypes mmap modulefinder msilib msvcrt 60 mailbox mailcap marshal math mimetypes mmap modulefinder msilib msvcrt
63 multiprocessing netrc nis nntplib numbers operator os os.path ossaudiodev 61 multiprocessing netrc nis nntplib numbers operator os ossaudiodev parser path
64 parser pathlib pdb pickle pickletools pipes pkgutil platform plistlib 62 pathlib pdb pickle pickletools pipes pkgutil platform plistlib poplib posix
65 poplib posix pprint pty pwd py_compile pyclbr queue quopri random re readline 63 pprint pty pwd py_compile pyclbr queue quopri random re readline reprlib
66 reprlib resource rlcompleter runpy sched select selectors shelve shlex shutil 64 resource rlcompleter runpy sched select selectors shelve shlex shutil signal
67 signal site smtpd smtplib sndhdr socket socketserver spwd sqlite3 ssl stat 65 site smtpd smtplib sndhdr socket socketserver spwd sqlite3 ssl stat statistics
68 statistics string stringprep struct subprocess sunau symbol symtable sys 66 string stringprep struct subprocess sunau symbol symtable sys sysconfig syslog
69 sysconfig syslog tabnanny tarfile telnetlib tempfile termios textwrap 67 tabnanny tarfile telnetlib tempfile termios textwrap threading time timeit
70 threading time timeit tkinter token tokenize trace traceback tracemalloc tty 68 tkinter token tokenize trace traceback tracemalloc tty turtle types
71 turtle types unicodedata unittest urllib uu uuid venv warnings wave weakref 69 unicodedata unittest urllib uu uuid venv warnings wave weakref webbrowser
72 webbrowser winreg winsound wsgiref xdrlib xml xmlrpc zipfile zipimport 70 winreg winsound wsgiref xdrlib xml xmlrpc zipfile zipimport zlib""",
73 zlib""", 71 "Style": {
74 "Style": { 72 "fore": 0xDD9900,
75 "fore": 0xDD9900, 73 "font_bold": True,
76 } 74 }
77 }, 75 },
78 { 76 {
79 "Description": QCoreApplication.translate( 77 "Description": QCoreApplication.translate(
80 "LexerPython", "__future__ Imports"), 78 "LexerPython", "__future__ Imports"),
81 "Words": """ 79 "Words": """
82 __future__ with_statement unicode_literals print_function division 80 __future__ with_statement unicode_literals print_function division
83 absolute_import generator_stop annotations""", 81 absolute_import generator_stop annotations""",
84 "Style": { 82 "Style": {
85 "fore": 0xEE00AA, 83 "fore": 0xEE00AA,
86 "font_italic": True, 84 "font_italic": True,
87 }
88 } 85 }
89 ] 86 }
90 }, 87 ]
91 } 88 }
92 89
93 def language(self): 90 def language(self):
94 """ 91 """
95 Public method to get the lexer language. 92 Public method to get the lexer language.

eric ide

mercurial