mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-14 02:27:30 -07:00
Track variables created through coproc.
This commit is contained in:
parent
a485482979
commit
33c78b7c95
4 changed files with 24 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue