Reorganize repository

This commit is contained in:
2026-01-23 20:29:44 +01:00
parent 1433e07066
commit a1ddb4a170
40 changed files with 372 additions and 257084 deletions

82
crates/forth/src/ops.rs Normal file
View File

@@ -0,0 +1,82 @@
use super::types::SourceSpan;
#[derive(Clone, Debug, PartialEq)]
pub enum Op {
PushInt(i64, Option<SourceSpan>),
PushFloat(f64, Option<SourceSpan>),
PushStr(String, Option<SourceSpan>),
Dup,
Dupn,
Drop,
Swap,
Over,
Rot,
Nip,
Tuck,
Add,
Sub,
Mul,
Div,
Mod,
Neg,
Abs,
Floor,
Ceil,
Round,
Min,
Max,
Eq,
Ne,
Lt,
Gt,
Le,
Ge,
And,
Or,
Not,
BranchIfZero(usize, Option<SourceSpan>, Option<SourceSpan>),
Branch(usize),
NewCmd,
SetParam(String),
Emit,
Get,
Set,
GetContext(String),
Rand,
Rrand,
Seed,
Cycle,
Choose,
ChanceExec,
ProbExec,
Coin,
Mtof,
Ftom,
ListStart,
ListEnd,
ListEndCycle,
PCycle,
ListEndPCycle,
At,
Window,
Scale,
Pop,
Subdivide,
SetTempo,
Each,
Every,
Quotation(Vec<Op>, Option<SourceSpan>),
When,
Unless,
Adsr,
Ad,
Stack,
For,
LocalCycleEnd,
Echo,
Necho,
Apply,
Ramp,
Range,
Noise,
}