Track variables created through coproc.

This commit is contained in:
Vidar Holen
2015-01-27 10:11:17 -08:00
parent a485482979
commit 33c78b7c95
4 changed files with 24 additions and 7 deletions

View File

@@ -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)