diff options
author | Gaurav Jain <gaurav@gauravjain.org> | 2014-05-14 21:08:54 -0400 |
---|---|---|
committer | Gaurav Jain <gaurav@gauravjain.org> | 2014-05-14 21:08:54 -0400 |
commit | 41dc0d839cbee3a6bde8511d6fe246503b605c66 (patch) | |
tree | cd433129011f18380dbb7877f2d6c616d9a41fa8 /pygments | |
parent | 5788913e54e9a5430e699158f6daee5080d4e61f (diff) | |
download | pygments-41dc0d839cbee3a6bde8511d6fe246503b605c66.tar.gz |
Remove duplcation of PERL6_IDENTIFIER_RANGE
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/lexers/agile.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py index d7ff60b0..9057ac40 100644 --- a/pygments/lexers/agile.py +++ b/pygments/lexers/agile.py @@ -1987,7 +1987,7 @@ class Perl6Lexer(ExtendedRegexLexer): mimetypes = ['text/x-perl6', 'application/x-perl6'] flags = re.MULTILINE | re.DOTALL | re.UNICODE - PERL6_IDENTIFIER_RANGE = "['\w:-]" # if you alter this, search for a copy of it below + PERL6_IDENTIFIER_RANGE = "['\w:-]" PERL6_KEYWORDS = ( 'BEGIN', 'CATCH', 'CHECK', 'CONTROL', 'END', 'ENTER', 'FIRST', 'INIT', @@ -2345,8 +2345,8 @@ class Perl6Lexer(ExtendedRegexLexer): rating = False # check for my/our/has declarations - # copied PERL6_IDENTIFIER_RANGE from above; not happy about that - if re.search("(?:my|our|has)\s+(?:['\w:-]+\s+)?[$@%&(]", text): + if re.search("(?:my|our|has)\s+(?:" + Perl6Lexer.PERL6_IDENTIFIER_RANGE + \ + "+\s+)?[$@%&(]", text): rating = 0.8 saw_perl_decl = True |