Fixed parser not accepting `` in arithmetic contex

This commit is contained in:
Vidar Holen 2014-02-03 16:45:48 -08:00
parent 9dfeb6b42a
commit c5141b77bf
1 changed files with 3 additions and 1 deletions

View File

@ -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