improved perl-blocks in tt

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2009-07-09 00:13:48 -04:00
parent 4ea1f53a46
commit 311b2e48a4
1 changed files with 9 additions and 10 deletions

View File

@ -23,23 +23,22 @@ prule = RegionRule('tt.directive', r'\[\%(?= *PERL)', PerlDirectiveGrammar,
r'%%\]', PerlGrammar, r'\[%%', PerlDirectiveGrammar, '%%\]')
class TagGrammar(Grammar):
rules = [crule, drule, prule] + mode.html.TagGrammar.rules
rules = [crule, prule, drule] + mode.html.TagGrammar.rules
class JavascriptGrammar(Grammar):
rules = [crule, drule, prule] + mode.javascript.JavascriptGrammar.rules
rules = [crule, prule, drule] + mode.javascript.JavascriptGrammar.rules
class CSSGrammar(Grammar):
rules = [crule, drule, prule] + mode.css.CSSGrammar.rules
rules = [crule, prule, drule] + mode.css.CSSGrammar.rules
class CommentGrammar(Grammar):
rules = [crule, drule, prule] + mode.html.CommentGrammar.rules
rules = [crule, prule, drule] + mode.html.CommentGrammar.rules
class CDataGrammar(Grammar):
rules = [crule, drule, prule] + mode.html.CDataGrammar.rules
rules = [crule, prule, drule] + mode.html.CDataGrammar.rules
class MetadataGrammar(Grammar):
rules = [crule, drule, prule] + mode.html.MetadataGrammar.rules
rules = [crule, prule, drule] + mode.html.MetadataGrammar.rules
class DoctypeGrammar(Grammar):
rules = [crule, drule, prule] + mode.html.DoctypeGrammar.rules
rules = [crule, prule, drule] + mode.html.DoctypeGrammar.rules
class TemplateGrammar(Grammar):
rules = [
crule, drule, prule,
rules = [crule, prule, drule] + [
PatternRule('escaped', '&[^;]+;'),
PatternRule('html.data', r'[^\[&<]+'),
PatternRule('html.data', '[^&<]+'),
@ -81,7 +80,7 @@ class Template(mode.Fundamental):
'tt.tag.string.null': ('green', 'default', 'bold'),
'tt.tag.string.end': ('green', 'default', 'bold'),
'tt.tag.end': ('default', 'default'),
'tt.perl': ('red', 'default', 'bold'),
'tt.perl': ('cyan', 'default', 'bold'),
}
_bindings = {
'close-paren': (')',),