Stopped static being generated in front of typedef

This commit is contained in:
Neil Brown 2009-04-01 19:58:30 +00:00
parent ef36c39c38
commit 37ff130ec9

View File

@ -1408,9 +1408,8 @@ cintroduceSpec _ (A.Specification _ _ (A.DataType _ _)) = return ()
cintroduceSpec _ (A.Specification _ _ (A.RecordType _ _ _)) = return () cintroduceSpec _ (A.Specification _ _ (A.RecordType _ _ _)) = return ()
cintroduceSpec _ (A.Specification _ _ (A.ChanBundleType {})) = return () cintroduceSpec _ (A.Specification _ _ (A.ChanBundleType {})) = return ()
cintroduceSpec _ (A.Specification _ n (A.Protocol _ _)) = return () cintroduceSpec _ (A.Specification _ n (A.Protocol _ _)) = return ()
cintroduceSpec lvl (A.Specification _ n (A.ProtocolCase _ ts)) cintroduceSpec _ (A.Specification _ n (A.ProtocolCase _ ts))
= do genStatic lvl n = do tell ["typedef enum{"]
tell ["typedef enum{"]
seqComma [genName tag >> tell ["_"] >> genName n | (tag, _) <- ts] seqComma [genName tag >> tell ["_"] >> genName n | (tag, _) <- ts]
-- You aren't allowed to have an empty enum. -- You aren't allowed to have an empty enum.
when (ts == []) $ when (ts == []) $