cl-interpret: Change print to print without newline, add new println builtin
This commit is contained in:
parent
6b16c55d97
commit
0beb121f32
@ -16,6 +16,14 @@ builtins! {
|
||||
const MISC;
|
||||
/// Unstable variadic print function
|
||||
pub fn print<_, args> () -> IResult<ConValue> {
|
||||
let mut out = stdout().lock();
|
||||
for arg in args {
|
||||
write!(out, "{arg}").ok();
|
||||
}
|
||||
Ok(ConValue::Empty)
|
||||
}
|
||||
/// Unstable variadic println function
|
||||
pub fn println<_, args> () -> IResult<ConValue> {
|
||||
let mut out = stdout().lock();
|
||||
for arg in args {
|
||||
write!(out, "{arg}").ok();
|
||||
|
Loading…
Reference in New Issue
Block a user