ThirdParty/Pygments/pygments/lexers/perl.py

changeset 4697
c2e9bf425554
parent 4172
4f20dba37ab6
child 5713
6762afd9f963
equal deleted inserted replaced
4696:bf4d19a7cade 4697:c2e9bf425554
3 pygments.lexers.perl 3 pygments.lexers.perl
4 ~~~~~~~~~~~~~~~~~~~~ 4 ~~~~~~~~~~~~~~~~~~~~
5 5
6 Lexers for Perl and related languages. 6 Lexers for Perl and related languages.
7 7
8 :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. 8 :copyright: Copyright 2006-2015 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 13
44 (r'@(\\\\|\\[^\\]|[^\\@])*@[egimosx]*', String.Regex, '#pop'), 44 (r'@(\\\\|\\[^\\]|[^\\@])*@[egimosx]*', String.Regex, '#pop'),
45 (r'%(\\\\|\\[^\\]|[^\\%])*%[egimosx]*', String.Regex, '#pop'), 45 (r'%(\\\\|\\[^\\]|[^\\%])*%[egimosx]*', String.Regex, '#pop'),
46 (r'\$(\\\\|\\[^\\]|[^\\$])*\$[egimosx]*', String.Regex, '#pop'), 46 (r'\$(\\\\|\\[^\\]|[^\\$])*\$[egimosx]*', String.Regex, '#pop'),
47 ], 47 ],
48 'root': [ 48 'root': [
49 (r'\A\#!.+?$', Comment.Hashbang),
49 (r'\#.*?$', Comment.Single), 50 (r'\#.*?$', Comment.Single),
50 (r'^=[a-zA-Z0-9]+\s+.*?\n=cut', Comment.Multiline), 51 (r'^=[a-zA-Z0-9]+\s+.*?\n=cut', Comment.Multiline),
51 (words(( 52 (words((
52 'case', 'continue', 'do', 'else', 'elsif', 'for', 'foreach', 53 'case', 'continue', 'do', 'else', 'elsif', 'for', 'foreach',
53 'if', 'last', 'my', 'next', 'our', 'redo', 'reset', 'then', 54 'if', 'last', 'my', 'next', 'our', 'redo', 'reset', 'then',

eric ide

mercurial