Related duplicate rule reporting in lexer
This commit is contained in:
parent
a6eab9d9e0
commit
d614aa0e04
@ -74,7 +74,8 @@ class LexerMetaDict(OrderedDict):
|
||||
'''
|
||||
def __setitem__(self, key, value):
|
||||
if key in self and not isinstance(value, property):
|
||||
if isinstance(self[key], str) and callable(value):
|
||||
if isinstance(self[key], str):
|
||||
if callable(value):
|
||||
value.pattern = self[key]
|
||||
else:
|
||||
raise AttributeError('Name %s redefined' % (key))
|
||||
|
Loading…
x
Reference in New Issue
Block a user