Improve SC1033/SC1034 message
This commit is contained in:
parent
34885142e7
commit
cc81bdee31
|
@ -945,8 +945,8 @@ readCondition = called "test expression" $ do
|
|||
cpos <- getPosition
|
||||
close <- try (string "]]") <|> string "]" <|> fail "Expected test to end here (don't wrap commands in []/[[]])"
|
||||
id <- endSpan start
|
||||
when (open == "[[" && close /= "]]") $ parseProblemAt cpos ErrorC 1033 "Did you mean ]] ?"
|
||||
when (open == "[" && close /= "]" ) $ parseProblemAt opos ErrorC 1034 "Did you mean [[ ?"
|
||||
when (open == "[[" && close /= "]]") $ parseProblemAt cpos ErrorC 1033 "Test expression was opened with double [[ but closed with single ]. Make sure they match."
|
||||
when (open == "[" && close /= "]" ) $ parseProblemAt opos ErrorC 1034 "Test expression was opened with single [ but closed with double ]]. Make sure they match."
|
||||
optional $ lookAhead $ do
|
||||
pos <- getPosition
|
||||
notFollowedBy2 readCmdWord <|>
|
||||
|
|
Loading…
Reference in New Issue