parent
7c113ed27d
commit
1310911e1f
5
lex.py
5
lex.py
|
@ -207,7 +207,10 @@ class LazyPatternRule(Rule):
|
||||||
self.pattern = pattern
|
self.pattern = pattern
|
||||||
self.d = {}
|
self.d = {}
|
||||||
def _compile(self, d):
|
def _compile(self, d):
|
||||||
self.re = re.compile(self.pattern % d, self.reflags)
|
try:
|
||||||
|
self.re = re.compile(self.pattern % d, self.reflags)
|
||||||
|
except:
|
||||||
|
self.re = re.compile(self.pattern)
|
||||||
self.d = d
|
self.d = d
|
||||||
def match(self, lexer, parent):
|
def match(self, lexer, parent):
|
||||||
if self.d != parent.matchd:
|
if self.d != parent.matchd:
|
||||||
|
|
Loading…
Reference in New Issue