Class for VHDL type declarations

This commit is contained in:
Nick Gasson 2008-07-17 11:59:02 +01:00
parent 553f3d77a9
commit 7c5b0f737c
2 changed files with 16 additions and 0 deletions

View File

@ -380,6 +380,14 @@ void vhdl_signal_decl::emit(std::ostream &of, int level) const
emit_comment(of, level, true);
}
void vhdl_type_decl::emit(std::ofstream &of, int level) const
{
of << "type " << name_ << " is ";
type_->emit(of, level);
of << ";";
emit_comment(of, level, true);
}
vhdl_expr::~vhdl_expr()
{
if (type_ != NULL)

View File

@ -462,6 +462,14 @@ private:
};
class vhdl_type_decl : public vhdl_decl {
public:
vhdl_type_decl(const char *name, vhdl_type *base)
: vhdl_decl(name, base) {}
void emit(std::ofstream &of, int level) const;
};
/*
* A variable declaration inside a process (although this isn't
* enforced here).