mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-09-20 02:33:31 +08:00
Improve error for missing final ) in $((foo)
This commit is contained in:
@@ -1255,7 +1255,9 @@ readDollarArithmetic = called "$((..)) expression" $ do
|
|||||||
id <- getNextId
|
id <- getNextId
|
||||||
try (string "$((")
|
try (string "$((")
|
||||||
c <- readArithmeticContents
|
c <- readArithmeticContents
|
||||||
string "))"
|
pos <- getPosition
|
||||||
|
char ')'
|
||||||
|
char ')' <|> fail "Expected a double )) to end the $((..))"
|
||||||
return (T_DollarArithmetic id c)
|
return (T_DollarArithmetic id c)
|
||||||
|
|
||||||
readDollarBracket = called "$[..] expression" $ do
|
readDollarBracket = called "$[..] expression" $ do
|
||||||
|
Reference in New Issue
Block a user