Added pick and select for lists
Pick: (1 2 3 4)?4 or (1 2 3 4)?(3 2) Select: (1 2 3 4)~2 or (1 2 3 4)~(2 3)
This commit is contained in:
@ -56,8 +56,9 @@
|
||||
right_op: list | number
|
||||
// Operators that work only on lists: | << >>
|
||||
list_operator: /(\||<<|>>|<>|#|@)(?=[(\d])/
|
||||
// /(\||<<|>>|<>|#|@)(?=[(\d])/
|
||||
// Common operators that works with numbers 3+5 3-5 etc.
|
||||
operator: /([\+\-\*\/%\&])/
|
||||
operator: /(\+|-|\*|\/|%|&|\?|~)/
|
||||
|
||||
// Euclidean cycles
|
||||
// TODO: Support randomization etc.
|
||||
@ -66,7 +67,8 @@
|
||||
?euclid_operator: /<[0-9]+,[0-9]+(,[0-9])?>/
|
||||
|
||||
// Lisp like list operation
|
||||
lisp_operation: "(" operator WS sequence ")"
|
||||
lisp_operator: /([\+\-\*\/%\&])/
|
||||
lisp_operation: "(" lisp_operator WS sequence ")"
|
||||
|
||||
// Subdivision
|
||||
subdivision: "[" subitems "]"
|
||||
|
||||
Reference in New Issue
Block a user