Eval's integer representation is now its length

- consistency with other types
This commit is contained in:
Erin 2021-08-29 00:07:26 +02:00 committed by ondra05
parent 24b6683b21
commit f08778ca3e

View file

@ -98,7 +98,7 @@ impl Value {
tape_len,
} => (instructions.len() + tape_len) as _,
Functio::AbleFunctio { params, body } => (params.len() + body.len()) as _,
Functio::Eval(s) => s.parse().unwrap_or(consts::ANSWER),
Functio::Eval(s) => s.len() as _,
},
Value::Int(i) => i,
Value::Nul => consts::ANSWER,