Fixed recursive channel bundle types to work properly
This commit is contained in:
parent
2d232dd322
commit
69d7bc6455
|
@ -422,6 +422,7 @@ scopeInSpec (spec@(A.Specification m n st), nt)
|
||||||
where
|
where
|
||||||
isRecursive (A.Function _ (_, A.Recursive) _ _ _) = True
|
isRecursive (A.Function _ (_, A.Recursive) _ _ _) = True
|
||||||
isRecursive (A.Proc _ (_, A.Recursive) _ _) = True
|
isRecursive (A.Proc _ (_, A.Recursive) _ _) = True
|
||||||
|
isRecursive (A.ChanBundleType _ A.Recursive _) = True
|
||||||
isRecursive _ = False
|
isRecursive _ = False
|
||||||
|
|
||||||
scopeOutSpec :: A.Specification -> OccParser ()
|
scopeOutSpec :: A.Specification -> OccParser ()
|
||||||
|
@ -1109,7 +1110,7 @@ definition
|
||||||
<|> do { n <- newRecordName; eol; indent; rec <- structuredType; outdent; sColon; eol;
|
<|> do { n <- newRecordName; eol; indent; rec <- structuredType; outdent; sColon; eol;
|
||||||
return (A.Specification m n rec, RecordName) }
|
return (A.Specification m n rec, RecordName) }
|
||||||
<|> do m <- md
|
<|> do m <- md
|
||||||
rec <- recMode sCHAN >>* fst
|
rm <- recMode sCHAN >>* fst
|
||||||
sTYPE
|
sTYPE
|
||||||
n <- newChanBundleName
|
n <- newChanBundleName
|
||||||
eol
|
eol
|
||||||
|
@ -1118,12 +1119,16 @@ definition
|
||||||
sRECORD
|
sRECORD
|
||||||
eol
|
eol
|
||||||
indent
|
indent
|
||||||
|
n' <- if rm == A.Recursive
|
||||||
|
then scopeIn n ChanBundleName
|
||||||
|
(A.ChanBundleType m rm []) A.Original
|
||||||
|
else return n
|
||||||
fs <- many1 chanInBundle
|
fs <- many1 chanInBundle
|
||||||
outdent
|
outdent
|
||||||
outdent
|
outdent
|
||||||
sColon
|
sColon
|
||||||
eol
|
eol
|
||||||
return (A.Specification m n $ A.ChanBundleType m rec fs, ChanBundleName)
|
return (A.Specification m n' $ A.ChanBundleType m rm fs, ChanBundleName)
|
||||||
<|> do m <- md
|
<|> do m <- md
|
||||||
sPROTOCOL
|
sPROTOCOL
|
||||||
n <- newProtocolName
|
n <- newProtocolName
|
||||||
|
|
Loading…
Reference in New Issue
Block a user