some conf improvements

--HG--
branch : pmacs2
This commit is contained in:
moculus 2009-04-06 02:30:19 +00:00
parent 0084721108
commit 0967b3ff63
1 changed files with 5 additions and 4 deletions

View File

@ -4,10 +4,11 @@ from mode.python import StringGrammar1, StringGrammar2
class ConfGrammar(Grammar):
rules = [
PatternRule('comment', '#.*$'),
PatternRule('comment', '//.*$'),
RegionRule('string', "'", StringGrammar1, "'"),
RegionRule('string', '"', StringGrammar2, '"'),
PatternRule('conf.comment', '#.*$'),
PatternRule('conf.comment', '//.*$'),
RegionRule('conf.string', "'", StringGrammar1, "'"),
RegionRule('conf.string', '"', StringGrammar2, '"'),
PatternRule('conf.data', r'(?:[^\'"#/]|/(?!/))+'),
]
class Conf(Fundamental):