vhdlpp: ActiveScope::is_vector_name() checks also for constants.
This commit is contained in:
parent
f51c037432
commit
0046e9eca0
|
|
@ -104,7 +104,7 @@ const VType*ScopeBase::find_type(perm_string by_name)
|
|||
return cur->second;
|
||||
}
|
||||
|
||||
bool ScopeBase::find_constant(perm_string by_name, const VType*&typ, Expression*&exp)
|
||||
bool ScopeBase::find_constant(perm_string by_name, const VType*&typ, Expression*&exp) const
|
||||
{
|
||||
map<perm_string,struct const_t*>::const_iterator cur = cur_constants_.find(by_name);
|
||||
if (cur == cur_constants_.end()) {
|
||||
|
|
@ -281,6 +281,11 @@ bool ActiveScope::is_vector_name(perm_string name) const
|
|||
if (find_variable(name))
|
||||
return true;
|
||||
|
||||
const VType*dummy_type;
|
||||
Expression*dummy_exp;
|
||||
if (find_constant(name, dummy_type, dummy_exp))
|
||||
return true;
|
||||
|
||||
if (context_entity_ && context_entity_->find_port(name))
|
||||
return true;
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class ScopeBase {
|
|||
virtual ~ScopeBase() =0;
|
||||
|
||||
const VType* find_type(perm_string by_name);
|
||||
bool find_constant(perm_string by_name, const VType*&typ, Expression*&exp);
|
||||
bool find_constant(perm_string by_name, const VType*&typ, Expression*&exp) const;
|
||||
Signal* find_signal(perm_string by_name) const;
|
||||
Variable* find_variable(perm_string by_name) const;
|
||||
virtual const InterfacePort* find_param(perm_string by_name) const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue