Fix parsing of [[ a =~ {$var} ]]
This commit is contained in:
parent
86999ded1f
commit
40136fe249
|
@ -2057,6 +2057,7 @@ prop_checkUnused29= verifyNotTree checkUnusedAssignments "var=(a b); declare -p
|
|||
prop_checkUnused30= verifyTree checkUnusedAssignments "let a=1"
|
||||
prop_checkUnused31= verifyTree checkUnusedAssignments "let 'a=1'"
|
||||
prop_checkUnused32= verifyTree checkUnusedAssignments "let a=b=c; echo $a"
|
||||
prop_checkUnused33= verifyNotTree checkUnusedAssignments "a=foo; [[ foo =~ ^{$a}$ ]]"
|
||||
checkUnusedAssignments params t = execWriter (mapM_ warnFor unused)
|
||||
where
|
||||
flow = variableFlow params
|
||||
|
|
|
@ -586,8 +586,8 @@ readConditionContents single =
|
|||
where
|
||||
readGlobLiteral = do
|
||||
id <- getNextId
|
||||
s <- many1 (extglobStart <|> oneOf "{}[]$")
|
||||
return $ T_Literal id s
|
||||
s <- extglobStart <|> oneOf "{}[]$"
|
||||
return $ T_Literal id [s]
|
||||
readGroup = called "regex grouping" $ do
|
||||
id <- getNextId
|
||||
char '('
|
||||
|
|
Loading…
Reference in New Issue