Open
Description
Very useful project, looking forward to the continuation.
Describe the bug
I managed to hit this when running under emacs' shell mode. Interestingly it doesn't happen in a terminal.
To Reproduce
Steps to reproduce the behavior
On a Linux box,
- run
emacs
, M-x shell
(that's Meta-x or alternativeESC
andx
, followed byshell
return)cargo run --bin repl --features interpreter
(the feature isn't relevant)
$ cargo run --bin repl --features interpreter
Compiling calculator v0.0.0 (/home/tommy/projects/Rust/create-your-own-lang-with-rust/calculator)
Finished dev [unoptimized + debuginfo] target(s) in 2.92s
Running `target/debug/repl`
Calculator prompt. Expressions are line evaluated.
>> 1+2
Compiling the source: 1+2
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { variant: ParsingError { positives: [EOI\
, Operator], negatives: [] }, location: Pos(3), line_col: Pos((1, 4)), path: None, line: "1+2␊", continued_line: None }\
', /home/tommy/projects/Rust/create-your-own-lang-with-rust/calculator/src/lib.rs:20:52
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Expected behavior
The behavior described in the documentation (or as it works outside of shell-mode)