From bb31ef32d9fb3603cdd881e87625ccda2f9f1676 Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Sat, 25 Jul 2009 12:08:56 -0400 Subject: [PATCH] allow negative numbers, rather than operator+number --HG-- branch : pmacs2 --- mode/perl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mode/perl.py b/mode/perl.py index b0bb8d7..fdd1d3b 100644 --- a/mode/perl.py +++ b/mode/perl.py @@ -147,7 +147,7 @@ class PerlGrammar(Grammar): #PatternRule('perl.cast', r'[\$\@\%\&\*](?= *{)'), PatternRule('perl.number', r'0[xX][0-9A-Fa-f]+'), - PatternRule('perl.number', r'0?\.[0-9]+|[0-9]+(?:\.[0-9]+)?'), + PatternRule('perl.number', r'-?0?\.[0-9]+|-?[0-9]+(?:\.[0-9]+)?'), # built-in scalars PatternRule('perl.array', r'\$' + word2 + '(?= *\[)'),