Some kind of refactoring

This commit is contained in:
2026-02-04 19:35:30 +01:00
parent 6cf9d2eec1
commit 82b0668bcf
18 changed files with 688 additions and 772 deletions

View File

@@ -2,12 +2,12 @@ pub mod categories;
pub mod docs;
mod script;
pub use cagire_forth::{lookup_word, Word, WordCompile, WORDS};
pub use cagire_forth::{
lookup_word, CcAccess, Dictionary, ExecutionTrace, Rng, SourceSpan, StepContext, Value,
Variables, Word, WordCompile, WORDS,
};
pub use cagire_project::{
load, save, Bank, LaunchQuantization, Pattern, PatternSpeed, Project, SyncMode, MAX_BANKS,
MAX_PATTERNS,
};
pub use script::{
CcAccess, Dictionary, ExecutionTrace, Rng, ScriptEngine, SourceSpan, StepContext, Value,
Variables,
};
pub use script::ScriptEngine;

View File

@@ -1,8 +1,4 @@
use cagire_forth::Forth;
pub use cagire_forth::{
CcAccess, Dictionary, ExecutionTrace, Rng, SourceSpan, StepContext, Value, Variables,
};
use cagire_forth::{Dictionary, ExecutionTrace, Forth, Rng, StepContext, Value, Variables};
pub struct ScriptEngine {
forth: Forth,
@@ -27,4 +23,8 @@ impl ScriptEngine {
) -> Result<Vec<String>, String> {
self.forth.evaluate_with_trace(script, ctx, trace)
}
pub fn stack(&self) -> Vec<Value> {
self.forth.stack()
}
}