Allow escaped linefeeds to break lines in $(())

This commit is contained in:
Vidar Holen 2015-07-15 09:01:29 -07:00
parent 6c21e4671b
commit 0522a5f0bd
1 changed files with 4 additions and 1 deletions

View File

@ -486,10 +486,13 @@ prop_a15= isOk readArithmeticContents "foo[`echo foo | sed s/foo/4/g` * 3] + 4"
prop_a16= isOk readArithmeticContents "$foo$bar"
prop_a17= isOk readArithmeticContents "i<(0+(1+1))"
prop_a18= isOk readArithmeticContents "a?b:c"
prop_a19= isOk readArithmeticContents "\\\n3 +\\\n 2"
readArithmeticContents =
readSequence
where
spacing = many whitespace
spacing =
let lf = try (string "\\\n") >> return '\n'
in many (whitespace <|> lf)
splitBy x ops = chainl1 x (readBinary ops)
readBinary ops = readComboOp ops TA_Binary