mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 14:27:35 +08:00
Track variables created through coproc.
This commit is contained in:
@@ -1814,11 +1814,15 @@ readCoProc = called "coproc" $ do
|
||||
readCompoundCoProc id = do
|
||||
var <- optionMaybe $
|
||||
readVariableName `thenSkip` whitespace
|
||||
body <- readCompoundCommand
|
||||
body <- readBody readCompoundCommand
|
||||
return $ T_CoProc id var body
|
||||
readSimpleCoProc id = do
|
||||
body <- readSimpleCommand
|
||||
body <- readBody readSimpleCommand
|
||||
return $ T_CoProc id Nothing body
|
||||
readBody parser = do
|
||||
id <- getNextId
|
||||
body <- parser
|
||||
return $ T_CoProcBody id body
|
||||
|
||||
|
||||
readPattern = (readNormalWord `thenSkip` spacing) `sepBy1` (char '|' `thenSkip` spacing)
|
||||
|
Reference in New Issue
Block a user