3 pygments.lexers.felix |
3 pygments.lexers.felix |
4 ~~~~~~~~~~~~~~~~~~~~~ |
4 ~~~~~~~~~~~~~~~~~~~~~ |
5 |
5 |
6 Lexer for the Felix language. |
6 Lexer for the Felix language. |
7 |
7 |
8 :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. |
8 :copyright: Copyright 2006-2017 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 from pygments.lexer import RegexLexer, include, bygroups, default, words, \ |
12 from pygments.lexer import RegexLexer, include, bygroups, default, words, \ |
13 combined |
13 combined |
235 (r'\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|' |
235 (r'\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|' |
236 r'U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})', String.Escape) |
236 r'U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})', String.Escape) |
237 ], |
237 ], |
238 'strings': [ |
238 'strings': [ |
239 (r'%(\([a-zA-Z0-9]+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?' |
239 (r'%(\([a-zA-Z0-9]+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?' |
240 '[hlL]?[diouxXeEfFgGcrs%]', String.Interpol), |
240 '[hlL]?[E-GXc-giorsux%]', String.Interpol), |
241 (r'[^\\\'"%\n]+', String), |
241 (r'[^\\\'"%\n]+', String), |
242 # quotes, percents and backslashes must be parsed one at a time |
242 # quotes, percents and backslashes must be parsed one at a time |
243 (r'[\'"\\]', String), |
243 (r'[\'"\\]', String), |
244 # unhandled string formatting sign |
244 # unhandled string formatting sign |
245 (r'%', String) |
245 (r'%', String) |