summaryrefslogtreecommitdiffstats
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/rebel-lang/examples/repl.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/rebel-lang/examples/repl.rs b/crates/rebel-lang/examples/repl.rs
index a07c802..8d76ec8 100644
--- a/crates/rebel-lang/examples/repl.rs
+++ b/crates/rebel-lang/examples/repl.rs
@@ -4,7 +4,7 @@ use rebel_lang::{
typing::{ArrayLen, Type, TypeFamily},
value::{EvalError, Result, Value},
};
-use rebel_parse::{ast::BodyStmt, recipe, tokenize};
+use rebel_parse::{recipe, tokenize};
use reedline::{DefaultPrompt, DefaultPromptSegment, Reedline, Signal, ValidationResult};
fn intrinsic_array_len(params: &[Value]) -> Result<Value> {
@@ -85,10 +85,6 @@ fn main() {
}
};
- if matches!(stmt, BodyStmt::Empty) {
- continue;
- }
-
if let Err(err) = stmt.validate() {
println!("Validation error: {err:?}");
continue;
@@ -112,6 +108,9 @@ fn main() {
continue;
}
};
- println!("{value}: {typ}");
+
+ if value != Value::Unit {
+ println!("{value}: {typ}");
+ }
}
}