mirror of
				https://github.com/koalaman/shellcheck.git
				synced 2025-10-31 14:39:20 +08:00 
			
		
		
		
	Don't try to parse $'..' in ""
This commit is contained in:
		| @@ -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 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user