From c5141b77bf46fddaaf2f33857fcd5f73bcace73a Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Mon, 3 Feb 2014 16:45:48 -0800 Subject: [PATCH] Fixed parser not accepting `` in arithmetic contex --- ShellCheck/Parser.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ShellCheck/Parser.hs b/ShellCheck/Parser.hs index 5dd6535..f72b1d3 100644 --- a/ShellCheck/Parser.hs +++ b/ShellCheck/Parser.hs @@ -442,6 +442,8 @@ prop_aA = isOk readArithmeticContents "! $?" prop_aB = isOk readArithmeticContents "10#08 * 16#f" prop_aC = isOk readArithmeticContents "\"$((3+2))\" + '37'" prop_aD = isOk readArithmeticContents "foo[9*y+x]++" +prop_aE = isOk readArithmeticContents "1+`echo 2`" +prop_aF = isOk readArithmeticContents "foo[`echo foo | sed s/foo/4/g` * 3] + 4" readArithmeticContents = readSequence where @@ -475,7 +477,7 @@ readArithmeticContents = readExpansion = do id <- getNextId - x <- readNormalDollar + x <- readNormalDollar <|> readBackTicked spacing return $ TA_Expansion id x