提交 a793e09b 编写于 作者: V Vidar Holen

Added hint to suggest missing ;; in case

上级 fbd85e93
......@@ -34,7 +34,7 @@ import System.IO
import Text.Parsec.Error
import GHC.Exts (sortWith)
lastError = 1074
backslash = char '\\'
linefeed = (optional carriageReturn) >> char '\n'
......@@ -1464,7 +1464,11 @@ readCaseItem = called "case item" $ do
g_Rparen
readLineBreak
list <- ((lookAhead g_DSEMI >> return []) <|> readCompoundList)
(g_DSEMI <|> lookAhead (readLineBreak >> g_Esac))
(g_DSEMI <|> lookAhead (readLineBreak >> g_Esac)) `attempting` do
pos <- getPosition
lookAhead g_Rparen
parseProblemAt pos ErrorC 1074
"Did you forget the ;; after the previous case item?"
readLineBreak
return (pattern, list)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册