fix tt single-quote bug

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2009-07-21 12:51:27 -04:00
parent e8d4bcbc7e
commit 2696bf99e2
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ import mode.xml
import mode.html
import mode.javascript
import mode.css
from mode.perl import StringGrammar, PerlGrammar
from mode.perl import StrictStringGrammar, StringGrammar, PerlGrammar
class PerlDirectiveGrammar(Grammar):
rules = [PatternRule('tt.perl', '(?:PERL|RAWPERL|END)(?![A-Z_])')]
@ -14,7 +14,7 @@ class DirectiveGrammar(Grammar):
PatternRule('tt.keyword', r'(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|FINAL|FILTER|FOREACH|ELSIF|ELSE|END|GET|IF|INCLUDE|INSERT|IN|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)(?![A-Z_])'),
PatternRule('attribute', '[a-zA-Z_][a-zA-Z0-9_]*(?= *=)'),
RegionRule('string', '"', StringGrammar, '"'),
RegionRule('string', "'", StringGrammar, "'"),
RegionRule('string', "'", StrictStringGrammar, "'"),
]
crule = RegionRule('comment', r'\[\%#', Grammar, r'%%\]')