Parse double arithmetic negation, i.e. (( !!a ));

This commit is contained in:
Vidar Holen 2015-09-02 19:31:22 -07:00
parent 856a204ec3
commit 01c27dc96a
1 changed files with 2 additions and 1 deletions
ShellCheck

View File

@ -555,6 +555,7 @@ prop_a18= isOk readArithmeticContents "a?b:c"
prop_a19= isOk readArithmeticContents "\\\n3 +\\\n 2"
prop_a20= isOk readArithmeticContents "a ? b ? c : d : e"
prop_a21= isOk readArithmeticContents "a ? b : c ? d : e"
prop_a22= isOk readArithmeticContents "!!a"
readArithmeticContents =
readSequence
where
@ -650,7 +651,7 @@ readArithmeticContents =
id <- getNextId
op <- oneOf "!~"
spacing
x <- readAnySigned
x <- readAnyNegated
return $ TA_Unary id [op] x
readAnySigned = readSigned <|> readAnycremented