mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
Remove dependency on test module
This commit is contained in:
parent
6459b8d8cf
commit
f6179404d1
2 changed files with 6 additions and 4 deletions
|
@ -93,10 +93,12 @@ impl Validator for InputValidator {
|
||||||
Ok(ValidationResult::Incomplete)
|
Ok(ValidationResult::Incomplete)
|
||||||
} else {
|
} else {
|
||||||
let arena = bumpalo::Bump::new();
|
let arena = bumpalo::Bump::new();
|
||||||
match roc_parse::test_helpers::parse_expr_with(&arena, ctx.input()) {
|
let state = roc_parse::parser::State::new(ctx.input().trim().as_bytes());
|
||||||
|
|
||||||
|
match roc_parse::expr::parse_loc_expr(0, &arena, state) {
|
||||||
// Special case some syntax errors to allow for multi-line inputs
|
// Special case some syntax errors to allow for multi-line inputs
|
||||||
Err(SyntaxError::Expr(EExpr::DefMissingFinalExpr(_, _)))
|
Err((_, EExpr::DefMissingFinalExpr(_, _), _))
|
||||||
| Err(SyntaxError::Expr(EExpr::DefMissingFinalExpr2(_, _, _))) => {
|
| Err((_, EExpr::DefMissingFinalExpr2(_, _, _), _)) => {
|
||||||
Ok(ValidationResult::Incomplete)
|
Ok(ValidationResult::Incomplete)
|
||||||
}
|
}
|
||||||
_ => Ok(ValidationResult::Valid(None)),
|
_ => Ok(ValidationResult::Valid(None)),
|
||||||
|
|
|
@ -1360,7 +1360,7 @@ fn parse_expr_end<'a>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_loc_expr<'a>(
|
pub fn parse_loc_expr<'a>(
|
||||||
min_indent: u16,
|
min_indent: u16,
|
||||||
arena: &'a Bump,
|
arena: &'a Bump,
|
||||||
state: State<'a>,
|
state: State<'a>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue