Added repeat item to subdivisions
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -166,6 +166,7 @@ cython_debug/
|
||||
.vscode
|
||||
|
||||
# Debugging files
|
||||
debug/
|
||||
debug*.py
|
||||
test.py
|
||||
|
||||
|
||||
@ -230,7 +230,7 @@ class ZiffersTransformer(Transformer):
|
||||
"""Parse subdivision"""
|
||||
values = flatten(items[0])
|
||||
return Subdivision(
|
||||
values=values, text="[" + "".join([val.text for val in values]) + "]"
|
||||
values=values, wrap_start="[", wrap_end="]"
|
||||
)
|
||||
|
||||
def subitems(self, items):
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
modifier: /[#b]/
|
||||
|
||||
// Variable assignment
|
||||
assignment: variable ass_op (list | pitch_class | random_integer | random_pitch | cycle | list_op)
|
||||
assignment: variable ass_op (list | pitch_class | random_integer | random_pitch | cycle | list_op | repeat_item)
|
||||
ass_op: /[=~]/
|
||||
variable: /[A-Z]/
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
// Subdivision
|
||||
subdivision: "[" subitems "]"
|
||||
subitems: (pitch_class | random_integer | random_pitch | rest | oct_mod | oct_change | WS | chord | named_roman | cycle | subdivision | list | list_op | range)*
|
||||
subitems: (pitch_class | random_integer | random_pitch | rest | oct_mod | oct_change | WS | chord | named_roman | cycle | subdivision | list | list_op | range | repeat_item)*
|
||||
|
||||
// Control characters modifying future events
|
||||
oct_mod: octave WS
|
||||
|
||||
Reference in New Issue
Block a user