roc-lang / roc

A fast, friendly, functional language.
https://roc-lang.org
Universal Permissive License v1.0
4.48k stars 315 forks source link

roc repl doesn't support "expect" #4323

Open lukewilliamboswell opened 2 years ago

lukewilliamboswell commented 2 years ago

roc repl doesn't support expect yet.

» expect 1 == 1
thread 'main' panicked at 'not yet implemented: unhandled parse error: Expect(Continuation(IndentEnd(@79), @79), @79)', crates/reporting/src/error/parse.rs:551:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
lukewilliamboswell commented 1 year ago

Still not quite resolved.

% roc repl

  The rockin’ roc repl
────────────────────────

Enter an expression, or :help, or :q to quit.

» expect 1 == 1
… 

── INDENT ENDS AFTER EXPRESSION ────────────────────────────────────────────────

I am partway through parsing an expect statement, but I got stuck
here:

4│      expect 1 == 1
                     ^

I was expecting a final expression, like so

    expect 1 + 1 == 2
    "done"

» expect
thread 'main' panicked at 'not yet implemented', crates/reporting/src/error/parse.rs:1355:59
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace