Improved help for missing here doc terminator.
This commit is contained in:
parent
66cebe7c7b
commit
10b5e44ad0
|
@ -977,7 +977,12 @@ verifyHereDoc dashed quoted spacing hereInfo = do
|
||||||
|
|
||||||
debugHereDoc pos endToken doc =
|
debugHereDoc pos endToken doc =
|
||||||
if endToken `isInfixOf` doc
|
if endToken `isInfixOf` doc
|
||||||
then parseProblemAt pos ErrorC ("Found " ++ endToken ++ " further down, but not by itself at the start of the line.")
|
then
|
||||||
|
let lookAt line = when (endToken `isInfixOf` line) $
|
||||||
|
parseProblemAt pos ErrorC ("Close matches include '" ++ line ++ "' (!= '" ++ endToken ++ "').")
|
||||||
|
in do
|
||||||
|
parseProblemAt pos ErrorC ("Found '" ++ endToken ++ "' further down, but not entirely by itself.")
|
||||||
|
mapM_ lookAt (lines doc)
|
||||||
else if (map toLower endToken) `isInfixOf` (map toLower doc)
|
else if (map toLower endToken) `isInfixOf` (map toLower doc)
|
||||||
then parseProblemAt pos ErrorC ("Found " ++ endToken ++ " further down, but with wrong casing.")
|
then parseProblemAt pos ErrorC ("Found " ++ endToken ++ " further down, but with wrong casing.")
|
||||||
else parseProblemAt pos ErrorC ("Couldn't find end token `" ++ endToken ++ "' in the here document.")
|
else parseProblemAt pos ErrorC ("Couldn't find end token `" ++ endToken ++ "' in the here document.")
|
||||||
|
|
Loading…
Reference in New Issue