parent
6e003b7ee5
commit
094ac8193f
|
@ -44,7 +44,7 @@ class PerlGrammar(Grammar):
|
|||
RegionRule(name=r'string2', start=r"'", grammar=g, end=r"'"),
|
||||
RegionRule(name=r'evalstring', start=r"`", grammar=sg, end=r"`"),
|
||||
PatternRule(name=r'number', pattern=r'0?\.[0-9]+|[0-9]+(?:\.[0-9]+)?'),
|
||||
PatternRule(name=r'keyword', pattern=r"(?<!->)(?:STDIN|STDERR|STDOUT|and|cmp|continue|do|else|elsif|eq|eval|foreach|for|if|last|my|next|ne|not|or|our|package|require|return|sub|undef|unless|until|use|while)(?![a-zA-Z0-9_])"),
|
||||
PatternRule(name=r'keyword', pattern=r"(?<!->)(?: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(name=r'hash_key', pattern=r'(?<={)[A-Za-z0-9_]+(?=})'),
|
||||
PatternRule(name=r'hash_key', pattern=r'[A-Za-z0-9_]+(?= *=>)'),
|
||||
PatternRule(name=r'length', pattern=r"\$#[A-Za-z0-9_](?:[A-Za-z0-9_]|::)*"),
|
||||
|
@ -97,10 +97,10 @@ class PerlGrammar(Grammar):
|
|||
#RegionRule(name=r'bracket', start=r'\[', grammar=None, end=r'\]'),
|
||||
|
||||
# some basic stuff
|
||||
#PatternRule(name=r'delimiter', pattern=r",|;|->|=>|=|\?|(?<!:):(?!=:)"),
|
||||
PatternRule(name=r'delimiter', pattern=r"[,;=\?(){}\[\]]|->|=>|(?<!:):(?!=:)"),
|
||||
PatternRule(name=r'operator', pattern=r"\+=|-=|\*=|/=|//=|%=|&=\|\^=|>>=|<<=|\*\*="),
|
||||
PatternRule(name=r'operator', pattern=r"\+|<=>|<>|<<|<=|<|-|>>|>=|>|\*\*|&|\*|\||/|\^|==|//|~|=~|!~|!=|%|!|\."),
|
||||
PatternRule(name=r'operator', pattern=r"\+\+|\+|<=>|<>|<<|<=|<|-|>>|>=|>|\*\*|\*|&&|&|\|\||\||/|\^|==|//|~|=~|!~|!=|%|!|\.|x(?![a-zA-Z_])"),
|
||||
PatternRule(name=r'operator2', pattern=r"(?:xor|or|not|ne|lt|le|gt|ge|eq|cmp|and)(?![a-zA-Z_])"),
|
||||
PatternRule(name=r'bareword', pattern=r'(?:[a-zA-Z_][a-zA-Z_0-9]*::)*[a-zA-Z_][a-zA-Z_0-9]*')
|
||||
]
|
||||
|
||||
|
@ -196,6 +196,7 @@ class Perl(mode2.Fundamental):
|
|||
'sub': color.build('cyan', 'default'),
|
||||
'number': color.build('default', 'default'),
|
||||
'operator': color.build('default', 'default'),
|
||||
'operator2': color.build('magenta', 'default'),
|
||||
'endblock': color.build('red', 'default'),
|
||||
'keyword': color.build('magenta', 'default'),
|
||||
'cast': color.build('yellow', 'default'),
|
||||
|
|
Loading…
Reference in New Issue