Preemptively fix possible '-- |' breakage

This commit is contained in:
Vidar Holen 2018-11-26 20:43:15 -08:00
parent 135b4aa485
commit 1b207b3d43
1 changed files with 3 additions and 2 deletions

View File

@ -1916,8 +1916,9 @@ readNewlineList =
where where
checkBadBreak = optional $ do checkBadBreak = optional $ do
pos <- getPosition pos <- getPosition
try $ lookAhead (oneOf "|&") -- |, || or && try $ lookAhead (oneOf "|&") -- See if the next thing could be |, || or &&
parseProblemAt pos ErrorC 1133 "Unexpected start of line. If breaking lines, |/||/&& should be at the end of the previous one." parseProblemAt pos ErrorC 1133
"Unexpected start of line. If breaking lines, |/||/&& should be at the end of the previous one."
readLineBreak = optional readNewlineList readLineBreak = optional readNewlineList
prop_readSeparator1 = isWarning readScript "a &; b" prop_readSeparator1 = isWarning readScript "a &; b"