This is an experimental Scheme in Rust. It serves as an accompaniment to reading SICP, and has no purpose outside of that.
Error reporting could be improved by adding spans to EvaluationResult
Any error about evaluation or parsing should always carry positional information. Refactor ReplError to carry a span and implement fmt::Display
+12
should be parsed as a symbol. It’s also weird that +12
doesn’t just work now, because shouldn’t it be a Sym(+)
followed by Int(12)
?
CAVEAT: our behaviour mirrors that of Scheme’s reference interpreter exactly, so I don’t know that it’s a bug at all.
Ignore this for now.
subtraction, division multiplication
floating point numbers “pollute” i.e. if there’s one floating point number anywhere in the expression, the result is fp, otherwise int.
Created: [2020-08-26 Wed 17:58] Ref: main.org RustConf talks