mirror of https://github.com/zachjs/sv2v.git
packed array conversion packs any unsupported unpacked dimensions
This commit is contained in:
parent
e80f880f43
commit
704e867c0c
|
|
@ -41,14 +41,16 @@ convertDescription =
|
|||
|
||||
-- collects and converts multi-dimensional packed-array declarations
|
||||
traverseDeclM :: Decl -> State Info Decl
|
||||
traverseDeclM (Variable Local t ident a me) = do
|
||||
t' <- traverseDeclM' t ident
|
||||
return $ Variable Local t' ident a me
|
||||
traverseDeclM (Variable dir t ident a me) = do
|
||||
let (tf, rs) = typeRanges t
|
||||
let t' = tf $ a ++ rs
|
||||
t'' <- traverseDeclM' t' ident
|
||||
return $ Variable dir t'' ident [] me
|
||||
if dir /= Local || (rs /= [] && a /= [])
|
||||
then do
|
||||
let t' = tf $ a ++ rs
|
||||
t'' <- traverseDeclM' t' ident
|
||||
return $ Variable dir t'' ident [] me
|
||||
else do
|
||||
t' <- traverseDeclM' t ident
|
||||
return $ Variable dir t' ident a me
|
||||
traverseDeclM (Parameter t ident e) = do
|
||||
t' <- traverseDeclM' t ident
|
||||
return $ Parameter t' ident e
|
||||
|
|
|
|||
Loading…
Reference in New Issue