vhdlpp: VTypeRange::type_match()
This commit is contained in:
parent
1ed4603a18
commit
fca2fff24e
|
|
@ -278,6 +278,7 @@ class VTypeRange : public VType {
|
|||
|
||||
bool write_std_types(std::ostream&fd) const;
|
||||
int emit_def(std::ostream&out, perm_string name) const;
|
||||
bool type_match(const VType*that) const;
|
||||
|
||||
// Get the type that is limited by the range.
|
||||
inline const VType*base_type() const { return base_; }
|
||||
|
|
|
|||
|
|
@ -85,3 +85,14 @@ bool VTypeArray::type_match(const VType*that) const
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool VTypeRange::type_match(const VType*that) const
|
||||
{
|
||||
if(VType::type_match(that))
|
||||
return true;
|
||||
|
||||
if(base_->type_match(that))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue