Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Parser isn't treating linefeed as whitespace #13

Open
tommythorn opened this issue Jan 7, 2022 · 0 comments
Open

[BUG] Parser isn't treating linefeed as whitespace #13

tommythorn opened this issue Jan 7, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@tommythorn
Copy link

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,

  1. run emacs,
  2. M-x shell (that's Meta-x or alternative ESC and x, followed by shell return)
  3. 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)

@tommythorn tommythorn added the bug Something isn't working label Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants