Fixed BnfNodeParser to allow expressions like 'number hundred' when number is a group
This commit is contained in:
+3
-3
@@ -205,9 +205,9 @@ def make_unique(lst, get_id=None):
|
||||
yield x
|
||||
else:
|
||||
for x in seq:
|
||||
x = get_id(x)
|
||||
if x not in seen:
|
||||
seen.add(x)
|
||||
_id = get_id(x)
|
||||
if _id not in seen:
|
||||
seen.add(_id)
|
||||
yield x
|
||||
|
||||
return list(_make_unique(lst, get_id))
|
||||
|
||||
Reference in New Issue
Block a user