@@ -3747,24 +3747,43 @@ toIfReport source context if_ startRow startCol =
3749 IfIndentElse row col ->
3749 IfIndentElse row col ->
3750+ case Code.nextLineStartsWithKeyword "else" source row of
3751+ Just (elseRow, elseCol) ->
3751− surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
3753+ surroundings = A.Region (A.Position startRow startCol) (A.Position elseRow elseCol)
3752− region = toRegion row col
3754+ region = toWiderRegion elseRow elseCol 4
3754− Report.Report "UNFINISHED IF" region [] $
3756+ Report.Report "WEIRD ELSE BRANCH" region [] $
3755− Code.toSnippet source surroundings (Just region)
3757+ Code.toSnippet source surroundings (Just region)
3757− D.reflow $
3759+ D.reflow $
3758− "I was expecting to see an `else` branch after this:"
3760+ "I was partway through an `if` expression when I got stuck here:"
3761− [ D.fillSep
3762+ D.fillSep $
3762− ["I","know","what","to","do","when","the","condition","is","True,"
3763+ ["I","think","this",D.cyan "else","keyword","needs","to","be","indented","more."
3763− ,"but","what","happens","when","it","is","False?"
3764+ ,"Try","adding","some","spaces","before","it."
3764− ,"Add","an",D.cyan "else","branch","to","handle","that","scenario!"
3770+ surroundings = A.Region (A.Position startRow startCol) (A.Position row col)
3771+ region = toRegion row col
3773+ Report.Report "UNFINISHED IF" region [] $
3774+ Code.toSnippet source surroundings (Just region)
3777+ "I was expecting to see an `else` branch after this:"
3781+ ["I","know","what","to","do","when","the","condition","is","True,"
3782+ ,"but","what","happens","when","it","is","False?"
3783+ ,"Add","an",D.cyan "else","branch","to","handle","that","scenario!"