Don't try to parse $'..' in ""
This commit is contained in:
parent
3832ca9d5c
commit
e6f2ee1f88
|
@ -692,6 +692,7 @@ readBackTicked = called "backtick expansion" $ do
|
||||||
|
|
||||||
|
|
||||||
prop_readDoubleQuoted = isOk readDoubleQuoted "\"Hello $FOO\""
|
prop_readDoubleQuoted = isOk readDoubleQuoted "\"Hello $FOO\""
|
||||||
|
prop_readDoubleQuoted2 = isOk readDoubleQuoted "\"$'\""
|
||||||
readDoubleQuoted = called "double quoted string" $ do
|
readDoubleQuoted = called "double quoted string" $ do
|
||||||
id <- getNextId
|
id <- getNextId
|
||||||
doubleQuote
|
doubleQuote
|
||||||
|
@ -846,9 +847,9 @@ readBraced = try $ do
|
||||||
char '}'
|
char '}'
|
||||||
return $ T_BraceExpansion id $ concat str
|
return $ T_BraceExpansion id $ concat str
|
||||||
|
|
||||||
readNormalDollar = readDollarExpression <|> readDollarLonely <|> readDollarDoubleQuote
|
readNormalDollar = readDollarExpression <|> readDollarLonely <|> readDollarDoubleQuote <|> readDollarSingleQuote
|
||||||
readDoubleQuotedDollar = readDollarExpression <|> readDollarLonely
|
readDoubleQuotedDollar = readDollarExpression <|> readDollarLonely
|
||||||
readDollarExpression = readDollarArithmetic <|> readDollarBracket <|> readDollarBraced <|> readDollarExpansion <|> readDollarVariable <|> readDollarSingleQuote
|
readDollarExpression = readDollarArithmetic <|> readDollarBracket <|> readDollarBraced <|> readDollarExpansion <|> readDollarVariable
|
||||||
|
|
||||||
prop_readDollarSingleQuote = isOk readDollarSingleQuote "$'foo\\\'lol'"
|
prop_readDollarSingleQuote = isOk readDollarSingleQuote "$'foo\\\'lol'"
|
||||||
readDollarSingleQuote = called "$'..' expression" $ do
|
readDollarSingleQuote = called "$'..' expression" $ do
|
||||||
|
|
Loading…
Reference in New Issue