okay that's how

This commit is contained in:
🪞👃🪞 2025-01-12 02:42:13 +01:00
parent 19ed6a24b8
commit 4ab08e48e5
2 changed files with 20 additions and 25 deletions

View file

@ -26,13 +26,11 @@ impl<'a> Token<'a> {
':'|'@' => Sym(source, index, 1), ':'|'@' => Sym(source, index, 1),
'0'..='9' => Num(source, index, 1), '0'..='9' => Num(source, index, 1),
'a'..='z' => Key(source, index, 1), 'a'..='z' => Key(source, index, 1),
//'\'' => Chr(source, index, 1),
_ => return Err(ParseError::Unexpected(c)) _ => return Err(ParseError::Unexpected(c))
}, },
Num(_, _, 0) => unreachable!(), Num(_, _, 0) => unreachable!(),
Sym(_, _, 0) => unreachable!(), Sym(_, _, 0) => unreachable!(),
Key(_, _, 0) => unreachable!(), Key(_, _, 0) => unreachable!(),
//Chr(_, _, 0) => unreachable!(),
Num(source, index, length) => match c { Num(source, index, length) => match c {
'0'..='9' => Num(source, index, length + 1), '0'..='9' => Num(source, index, length + 1),
' '|'\n'|'\r'|'\t' => return Ok(( ' '|'\n'|'\r'|'\t' => return Ok((

View file

@ -1,23 +1,20 @@
(enter note/put) (:enter note/put)
(del note/del) (:del note/del)
(',' note/dur/dec) (:comma note/dur/dec)
('.' note/dur/inc) (:period note/dur/inc)
('+' note/range/inc) (:plus note/range/inc)
('-' note/range/dec) (:underscore note/range/dec)
(up note/pos/inc) (:up note/pos/inc)
(down note/pos/dec) (:down note/pos/dec)
(:left time/pos/dec)
(left time/pos/dec) (:right time/pos/inc)
(right time/pos/inc) (:z time/zoom/lock)
('z' time/zoom/lock) (:equal time/zoom/in)
('=' time/zoom/in) (:minus time/zoom/out)
('-' time/zoom/out) (:space clock/toggle)
(:shift-space clock/toggle/zero)
;(@ctrl-k (midi/kbd/toggle)) (:u undo)
;(@space (clock/toggle)) (:r redo)
;(@shift-space (clock/toggle-start)) (:tab compact)
;(@u (undo)) (:q enqueue)
;(@shift-u (redo)) (:0 stop)
;(@tab (compact/toggle))
;(@q (player/enqueue :clip))
;(@0 (player/enqueue :stop)))