better comment regex

--HG--
branch : pmacs2
This commit is contained in:
moculus 2009-05-06 04:34:23 +00:00
parent b37debda45
commit ca649aa7e1
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class StringGrammar3(Grammar): rules = [PatternRule('data', r'[^)]+')]
class ForthGrammar(Grammar): class ForthGrammar(Grammar):
rules = [ rules = [
PatternRule('comment', r"\\(?: .*)?\n$"), PatternRule('comment', r"\\(?: .*)?\n$"),
RegionRule('comment', r'\((?= |\n)', DataGrammar, r'\)'), RegionRule('comment', r'\((?= |\n|$)', DataGrammar, r'\)'),
NocaseRegionRule('comment', r'0 \[if\]', DataGrammar, r'\[(?:endif|then)\]'), NocaseRegionRule('comment', r'0 \[if\]', DataGrammar, r'\[(?:endif|then)\]'),
RegionRule('string', r'[.cs]" ', StringGrammar2, r'"'), RegionRule('string', r'[.cs]" ', StringGrammar2, r'"'),
RegionRule('string', r'[.s]\\" ', StringGrammar2, r'"'), RegionRule('string', r'[.s]\\" ', StringGrammar2, r'"'),