diff --git a/mode/perl.py b/mode/perl.py index 442c575..27b713e 100644 --- a/mode/perl.py +++ b/mode/perl.py @@ -111,12 +111,18 @@ class PerlGrammar(Grammar): PatternRule('perl.keyword', "(?)(?:STDIN|STDERR|STDOUT|continue|do|else|elsif|eval|foreach|for|if|last|my|next|our|package|require|return|sub|undef|unless|until|use|while)(?![a-zA-Z0-9_])"), PatternRule('perl.hash_key', '(?<={)' + wchr2 + '+(?=})'), PatternRule('perl.method', '(?<=->)' + word1), + #PatternMatchRule('x', '(' + wchr2 + '+)( *)(=>)' + # 'perl.hash_key', 'spaces', 'delimiter'), PatternRule('perl.hash_key', wchr2 + '+(?= *=>)'), PatternRule('perl.length', r"\$#" + word2), + #PatternMatchRule('x', r'([\$\@\%\&\*])( *)({)', + # 'perl.cast', 'spaces', 'delimiter'), PatternRule('perl.cast', r'[\$\@\%\&\*](?= *{)'), PatternRule('perl.scalar', r"\$[\[\]<>ab/'\"_@\?#\$!%^|&*()](?!" + wchr2 + ")"), PatternRule('perl.array', "@_"), + #PatternMatchRule('x', r"(\$\$*" + word2 + ")(->)( *)(\()", + # 'perl.function', 'delimiter', 'spaces', 'delimiter'), PatternRule('perl.function', r"\$\$*" + word2 + "(?=-> *\()"), PatternRule('perl.scalar', r"\$\$*" + word2), PatternRule('perl.array', r"@\$*" + word2),