diff --git a/ShellCheck/Parser.hs b/ShellCheck/Parser.hs index a4878aa..bf8e4a2 100644 --- a/ShellCheck/Parser.hs +++ b/ShellCheck/Parser.hs @@ -1255,7 +1255,9 @@ readDollarArithmetic = called "$((..)) expression" $ do id <- getNextId try (string "$((") c <- readArithmeticContents - string "))" + pos <- getPosition + char ')' + char ')' <|> fail "Expected a double )) to end the $((..))" return (T_DollarArithmetic id c) readDollarBracket = called "$[..] expression" $ do