branch : pmacs2
This commit is contained in:
moculus 2009-02-24 00:07:38 +00:00
parent c5db9456ef
commit 79e7ba97b0
1 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,7 @@ class DirectiveGrammar(Grammar):
rules = [ rules = [
PatternRule(r'comment', r'#(?:[^%]|%(?!\]))*'), PatternRule(r'comment', r'#(?:[^%]|%(?!\]))*'),
PatternRule(r'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(r'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(r'attribute', r'[a-zA-Z_][a-zA-Z0-9_]*(?= *=)'),
RegionRule(r'string', r'"', StringGrammar, r'"'), RegionRule(r'string', r'"', StringGrammar, r'"'),
RegionRule(r'string', r"'", StringGrammar, r"'"), RegionRule(r'string', r"'", StringGrammar, r"'"),
] ]
@ -35,7 +36,8 @@ class Template(mode.Fundamental):
colors = { colors = {
'directive.start': ('magenta', 'default', 'bold'), 'directive.start': ('magenta', 'default', 'bold'),
'directive.comment': ('red', 'default', 'bold'), 'directive.comment': ('red', 'default', 'bold'),
'directive.keyword': ('cyan', 'default', 'bold'), 'directive.keyword': ('yellow', 'default', 'bold'),
'directive.attribute': ('magenta', 'default', 'bold'),
'directive.string.start': ('green', 'default', 'bold'), 'directive.string.start': ('green', 'default', 'bold'),
'directive.string.escaped': ('magenta', 'default', 'bold'), 'directive.string.escaped': ('magenta', 'default', 'bold'),
'directive.string.octal': ('magenta', 'default', 'bold'), 'directive.string.octal': ('magenta', 'default', 'bold'),