summaryrefslogtreecommitdiffstats
path: root/src/forth
diff options
context:
space:
mode:
authorBrian Cully <bjc@spork.org>2025-08-22 11:39:14 -0400
committerBrian Cully <bjc@spork.org>2025-08-22 11:39:14 -0400
commit40352318ad887ad0bab7c9a3d22695bbcbe9f738 (patch)
tree2d9822c1762cbc0852114149539abfa21185cc93 /src/forth
parenta1c946b747325b4d7df778ebc70112338482f143 (diff)
downloadautomathon-40352318ad887ad0bab7c9a3d22695bbcbe9f738.tar.gz
automathon-40352318ad887ad0bab7c9a3d22695bbcbe9f738.zip
start hooking the web ui up to rust
Diffstat (limited to 'src/forth')
-rw-r--r--src/forth/interp.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/forth/interp.rs b/src/forth/interp.rs
index f1af4ae..c6dcb72 100644
--- a/src/forth/interp.rs
+++ b/src/forth/interp.rs
@@ -1,3 +1,5 @@
+use log::debug;
+
use std::ops::Index;
#[derive(Clone, Debug, PartialEq)]
@@ -106,7 +108,7 @@ impl Interp {
let bc = &self.wordlist.0[self.ip.word];
match bc[self.ip.offset] {
OpCode::Num(n) => self.stack.0.push(n),
- OpCode::Str(start, end) => eprintln!("got str: {} to {}", start, end),
+ OpCode::Str(start, end) => debug!("got str: {} to {}", start, end),
OpCode::Add => {
let n1 = self.stack.0.pop().ok_or(RuntimeError::StackUnderflow)?;
let n2 = self.stack.0.pop().ok_or(RuntimeError::StackUnderflow)?;