Added new repeat syntax

Shortened syntax for repeats:
1:5 (1,5):4 (1 2 3):4
This commit is contained in:
2023-02-24 16:16:24 +02:00
parent bcc86f4cfe
commit 595fc346ae
2 changed files with 5 additions and 1 deletions

View File

@ -380,3 +380,6 @@ class ZiffersTransformer(Transformer):
)
else:
return RepeatedSequence(values=items[0], repeats=Integer(value=2, text="2"))
def repeat_item(self, items):
return RepeatedListSequence(values=[items[0]],repeats=items[1])