mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Fix parse error
This commit is contained in:
parent
549d326be8
commit
84c7c49110
1 changed files with 12 additions and 1 deletions
|
@ -1136,7 +1136,18 @@ mod ability {
|
||||||
initial,
|
initial,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
IndentLevel::Exact(wanted) if state.column() != wanted => {
|
IndentLevel::Exact(wanted) if state.column() < wanted => {
|
||||||
|
// This demand is not indented correctly
|
||||||
|
let indent_difference = state.column() as i32 - wanted as i32;
|
||||||
|
Err((
|
||||||
|
// Rollback because the deindent may be because there is a next
|
||||||
|
// expression
|
||||||
|
NoProgress,
|
||||||
|
EAbility::DemandAlignment(indent_difference, state.pos()),
|
||||||
|
initial,
|
||||||
|
))
|
||||||
|
}
|
||||||
|
IndentLevel::Exact(wanted) if state.column() > wanted => {
|
||||||
// This demand is not indented correctly
|
// This demand is not indented correctly
|
||||||
let indent_difference = state.column() as i32 - wanted as i32;
|
let indent_difference = state.column() as i32 - wanted as i32;
|
||||||
Err((
|
Err((
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue