Eval's integer representation is now its length
- consistency with other types
This commit is contained in:
parent
24b6683b21
commit
f08778ca3e
|
@ -98,7 +98,7 @@ impl Value {
|
||||||
tape_len,
|
tape_len,
|
||||||
} => (instructions.len() + tape_len) as _,
|
} => (instructions.len() + tape_len) as _,
|
||||||
Functio::AbleFunctio { params, body } => (params.len() + body.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::Int(i) => i,
|
||||||
Value::Nul => consts::ANSWER,
|
Value::Nul => consts::ANSWER,
|
||||||
|
|
Loading…
Reference in a new issue