From ca649aa7e13ce5e9ff9e8a94acac45d3cd5e42f3 Mon Sep 17 00:00:00 2001 From: moculus Date: Wed, 6 May 2009 04:34:23 +0000 Subject: [PATCH] better comment regex --HG-- branch : pmacs2 --- mode/forth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mode/forth.py b/mode/forth.py index f7c6505..9864e73 100644 --- a/mode/forth.py +++ b/mode/forth.py @@ -21,7 +21,7 @@ class StringGrammar3(Grammar): rules = [PatternRule('data', r'[^)]+')] class ForthGrammar(Grammar): rules = [ 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)\]'), RegionRule('string', r'[.cs]" ', StringGrammar2, r'"'), RegionRule('string', r'[.s]\\" ', StringGrammar2, r'"'),