mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
Merge pull request #6767 from wontem/comments-in-repl
Ignore comments in repl
This commit is contained in:
commit
33075285b7
2 changed files with 10 additions and 4 deletions
|
@ -275,6 +275,9 @@ pub fn parse_src<'a>(arena: &'a Bump, line: &'a str) -> ParseOutcome<'a> {
|
|||
|
||||
match roc_parse::expr::loc_expr(true).parse(arena, State::new(src_bytes), 0) {
|
||||
Ok((_, loc_expr, _)) => ParseOutcome::Expr(loc_expr.value),
|
||||
Err((roc_parse::parser::Progress::MadeProgress, EExpr::Start(_))) => {
|
||||
ParseOutcome::Empty
|
||||
}
|
||||
// Special case some syntax errors to allow for multi-line inputs
|
||||
Err((_, EExpr::Closure(EClosure::Body(_, _), _)))
|
||||
| Err((_, EExpr::When(EWhen::Pattern(EPattern::Start(_), _), _)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue