From b765ed1a446add353eb55ace8bfda082123430cf Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sun, 2 Dec 2012 20:40:01 -0800 Subject: [PATCH] Removed superfluous messages for [ cow] --- ShellCheck/Parser.hs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ShellCheck/Parser.hs b/ShellCheck/Parser.hs index 3f84df6..2f00f39 100644 --- a/ShellCheck/Parser.hs +++ b/ShellCheck/Parser.hs @@ -475,12 +475,7 @@ readCondition = called "test expression" $ do condition <- readConditionContents single cpos <- getPosition - close <- (try $ string "]]") <|> (string "]") <|> do - let match = (if single then "]" else "]]") - parseProblemAt opos ErrorC $ "Couldn't find matching " ++ match ++ "." - parseProblem ErrorC $ "Expected " ++ match ++ "." - fail "condition" - + close <- (try $ string "]]") <|> (string "]") when (open == "[[" && close /= "]]") $ parseProblemAt cpos ErrorC "Did you mean ]] ?" when (open == "[" && close /= "]" ) $ parseProblemAt opos ErrorC "Did you mean [[ ?" return $ T_Condition id (if single then SingleBracket else DoubleBracket) condition