Feat: UI / UX

This commit is contained in:
2026-02-16 01:22:40 +01:00
parent b23dd85d0f
commit af6732db1c
37 changed files with 1045 additions and 64 deletions

View File

@@ -272,6 +272,14 @@ pub(crate) fn compile_word(
}
}
if let Some(var_name) = name.strip_prefix(',') {
if !var_name.is_empty() {
ops.push(Op::PushStr(Arc::from(var_name), span));
ops.push(Op::SetKeep);
return true;
}
}
if let Some(midi) = parse_note_name(name) {
ops.push(Op::PushInt(midi, span));
return true;

View File

@@ -558,6 +558,16 @@ pub(super) const WORDS: &[Word] = &[
compile: Simple,
varargs: false,
},
Word {
name: ",<var>",
aliases: &[],
category: "Variables",
stack: "(val -- val)",
desc: "Store value in variable, keep on stack",
example: "440 ,freq => 440",
compile: Simple,
varargs: false,
},
// Definitions
Word {
name: ":",