Closed alexmozaidze closed 2 years ago
Some thoughts:
clippy::clone_on_ref_ptr
and the related changes; let's revert those.lines()
do that automatically? If so that's pretty cool. It works, in any case, but I'd still like to know exactly why.None
instead of Some(&code[index..])
on line 81 in parser.rs
. At least in the REPL this bubbles up as an Unrecognized expression
instead of automatically closing the string, which I think is better.Otherwise I think these changes look good
Ah, one other thing- there are some |c: char|
s in here that don't need the type annotation
Yeah, .lines()
returns an iterator, and it's None
when Ctrl-D is hit. I was quite surprised it worked so well.
I did the changes and simplified read_atom()
by ommiting unclosed strings check; it is not needed because we drop unclosed string on tokenization step now.
Merged and published to crates.io
After I've read your blog, I decided to check on
parser.rs
and found out how simple it actually is, which amazed me. I like the blogs, keep it up.I did following things in this PR: