mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-09-14 15:32:50 +08:00
Fixed parser not accepting `` in arithmetic contex
This commit is contained in:
@@ -442,6 +442,8 @@ prop_aA = isOk readArithmeticContents "! $?"
|
|||||||
prop_aB = isOk readArithmeticContents "10#08 * 16#f"
|
prop_aB = isOk readArithmeticContents "10#08 * 16#f"
|
||||||
prop_aC = isOk readArithmeticContents "\"$((3+2))\" + '37'"
|
prop_aC = isOk readArithmeticContents "\"$((3+2))\" + '37'"
|
||||||
prop_aD = isOk readArithmeticContents "foo[9*y+x]++"
|
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 =
|
readArithmeticContents =
|
||||||
readSequence
|
readSequence
|
||||||
where
|
where
|
||||||
@@ -475,7 +477,7 @@ readArithmeticContents =
|
|||||||
|
|
||||||
readExpansion = do
|
readExpansion = do
|
||||||
id <- getNextId
|
id <- getNextId
|
||||||
x <- readNormalDollar
|
x <- readNormalDollar <|> readBackTicked
|
||||||
spacing
|
spacing
|
||||||
return $ TA_Expansion id x
|
return $ TA_Expansion id x
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user