3 pygments.lexers.textedit |
3 pygments.lexers.textedit |
4 ~~~~~~~~~~~~~~~~~~~~~~~~ |
4 ~~~~~~~~~~~~~~~~~~~~~~~~ |
5 |
5 |
6 Lexers for languages related to text processing. |
6 Lexers for languages related to text processing. |
7 |
7 |
8 :copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS. |
8 :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. |
9 :license: BSD, see LICENSE for details. |
9 :license: BSD, see LICENSE for details. |
10 """ |
10 """ |
11 |
11 |
12 import re |
12 import re |
13 from bisect import bisect |
13 from bisect import bisect |
67 r'RSTART|RT|SUBSEP)\b', Name.Builtin), |
67 r'RSTART|RT|SUBSEP)\b', Name.Builtin), |
68 (r'[$a-zA-Z_]\w*', Name.Other), |
68 (r'[$a-zA-Z_]\w*', Name.Other), |
69 (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), |
69 (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), |
70 (r'0x[0-9a-fA-F]+', Number.Hex), |
70 (r'0x[0-9a-fA-F]+', Number.Hex), |
71 (r'[0-9]+', Number.Integer), |
71 (r'[0-9]+', Number.Integer), |
72 (r'"(\\\\|\\"|[^"])*"', String.Double), |
72 (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), |
73 (r"'(\\\\|\\'|[^'])*'", String.Single), |
73 (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single), |
74 ] |
74 ] |
75 } |
75 } |
76 |
76 |
77 |
77 |
78 class VimLexer(RegexLexer): |
78 class VimLexer(RegexLexer): |