Fix parse error

This commit is contained in:
ayazhafiz 2022-03-12 23:55:33 -06:00
parent 549d326be8
commit 84c7c49110

View file

@ -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((