parent
b78d42cba5
commit
185ee1a061
|
@ -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.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.hash_key', '(?<={)' + wchr2 + '+(?=})'),
|
||||||
PatternRule('perl.method', '(?<=->)' + word1),
|
PatternRule('perl.method', '(?<=->)' + word1),
|
||||||
|
#PatternMatchRule('x', '(' + wchr2 + '+)( *)(=>)'
|
||||||
|
# 'perl.hash_key', 'spaces', 'delimiter'),
|
||||||
PatternRule('perl.hash_key', wchr2 + '+(?= *=>)'),
|
PatternRule('perl.hash_key', wchr2 + '+(?= *=>)'),
|
||||||
PatternRule('perl.length', r"\$#" + word2),
|
PatternRule('perl.length', r"\$#" + word2),
|
||||||
|
#PatternMatchRule('x', r'([\$\@\%\&\*])( *)({)',
|
||||||
|
# 'perl.cast', 'spaces', 'delimiter'),
|
||||||
PatternRule('perl.cast', r'[\$\@\%\&\*](?= *{)'),
|
PatternRule('perl.cast', r'[\$\@\%\&\*](?= *{)'),
|
||||||
PatternRule('perl.scalar', r"\$[\[\]<>ab/'\"_@\?#\$!%^|&*()](?!" +
|
PatternRule('perl.scalar', r"\$[\[\]<>ab/'\"_@\?#\$!%^|&*()](?!" +
|
||||||
wchr2 + ")"),
|
wchr2 + ")"),
|
||||||
PatternRule('perl.array', "@_"),
|
PatternRule('perl.array', "@_"),
|
||||||
|
#PatternMatchRule('x', r"(\$\$*" + word2 + ")(->)( *)(\()",
|
||||||
|
# 'perl.function', 'delimiter', 'spaces', 'delimiter'),
|
||||||
PatternRule('perl.function', r"\$\$*" + word2 + "(?=-> *\()"),
|
PatternRule('perl.function', r"\$\$*" + word2 + "(?=-> *\()"),
|
||||||
PatternRule('perl.scalar', r"\$\$*" + word2),
|
PatternRule('perl.scalar', r"\$\$*" + word2),
|
||||||
PatternRule('perl.array', r"@\$*" + word2),
|
PatternRule('perl.array', r"@\$*" + word2),
|
||||||
|
|
Loading…
Reference in New Issue