Validate that set elements are unique during parse

This commit is contained in:
Emery Hemingway 2022-10-29 01:06:52 -05:00
parent d0af002b4a
commit 154ffb6cd8
1 changed files with 1 additions and 0 deletions

View File

@ -66,6 +66,7 @@ proc parsePreserves*(text: string): Preserve[void] {.gcsafe.} =
var prs = Value(kind: pkSet)
for frame in stack.mitems:
if frame.pos > capture[0].si:
for e in prs.set: validate(e != frame.value)
prs.incl(move frame.value)
stack.shrink prs.set.len
pushStack prs