fix escaping bug with sh

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2011-12-26 15:43:13 -05:00
parent 7961b689bc
commit 9c8895c345
1 changed files with 2 additions and 0 deletions

View File

@ -94,6 +94,7 @@ TestGrammar.rules = [
PatternRule(r'variable', r"\${(?:" + word + "|\?\$)}"),
PatternRule(r"variable", r"\$" + word),
PatternRule(r'variable', r"\$(?=\()"),
PatternRule(r'escaped', r'\\.'),
RegionRule(r'string', "'", StringGrammar1, "'"),
RegionRule(r'string', '"', StringGrammar2, '"'),
PatternRule(r'sh_bareword', r'[-a-zA-Z0-9_.]+'),
@ -124,6 +125,7 @@ ShGrammar.rules = [
PatternRule(r'variable', r"\${(?:" + word + "|\?\$)}"),
PatternRule(r"variable", r"\$" + word),
#PatternRule(r'variable', r"\$(?=\()"),
PatternRule('escaped', r'\\.'),
RegionRule(r'string', "'", StringGrammar1, "'"),
RegionRule(r'string', '"', StringGrammar2, '"'),
OverridePatternRule(r'comment', r'#@@:(?P<token>' + pname + '):(?P<mode>' + pname + ') *$'),