diff options
Diffstat (limited to 'ast.hs')
-rw-r--r-- | ast.hs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -20,6 +20,8 @@ data Declaration ,valueOf :: Maybe Expression} | DecTypedef {typeOf :: Type ,nameOf :: Name} + | DecExtern {typeOf :: Type + ,nameOf :: Name} deriving (Show) data Block = Block [Statement] @@ -102,6 +104,8 @@ instance PShow Declaration where concat [pshow t, " ", n, " = ", pshow e, ";"] pshow (DecTypedef t n) = concat ["type ", n, " = ", pshow t, ";"] + pshow (DecExtern t n) = + concat ["extern ", pshow t, " ", n, ";"] instance PShow Block where pshow (Block []) = "{}" |