parent
e8d4bcbc7e
commit
2696bf99e2
|
@ -4,7 +4,7 @@ import mode.xml
|
||||||
import mode.html
|
import mode.html
|
||||||
import mode.javascript
|
import mode.javascript
|
||||||
import mode.css
|
import mode.css
|
||||||
from mode.perl import StringGrammar, PerlGrammar
|
from mode.perl import StrictStringGrammar, StringGrammar, PerlGrammar
|
||||||
|
|
||||||
class PerlDirectiveGrammar(Grammar):
|
class PerlDirectiveGrammar(Grammar):
|
||||||
rules = [PatternRule('tt.perl', '(?:PERL|RAWPERL|END)(?![A-Z_])')]
|
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('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_]*(?= *=)'),
|
PatternRule('attribute', '[a-zA-Z_][a-zA-Z0-9_]*(?= *=)'),
|
||||||
RegionRule('string', '"', StringGrammar, '"'),
|
RegionRule('string', '"', StringGrammar, '"'),
|
||||||
RegionRule('string', "'", StringGrammar, "'"),
|
RegionRule('string', "'", StrictStringGrammar, "'"),
|
||||||
]
|
]
|
||||||
|
|
||||||
crule = RegionRule('comment', r'\[\%#', Grammar, r'%%\]')
|
crule = RegionRule('comment', r'\[\%#', Grammar, r'%%\]')
|
||||||
|
|
Loading…
Reference in New Issue