vhdlpp: Evaluates attributes if possible.
This commit is contained in:
parent
afbda099fb
commit
9128eb67b9
|
|
@ -307,6 +307,13 @@ int ExpAttribute::emit(ostream&out, Entity*ent, ScopeBase*scope)
|
|||
{
|
||||
int errors = 0;
|
||||
|
||||
// Try to evaluate first
|
||||
int64_t val;
|
||||
if(evaluate(scope, val)) {
|
||||
out << val;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (name_ == "event") {
|
||||
out << "$ivlh_attribute_event(";
|
||||
errors += base_->emit(out, ent, scope);
|
||||
|
|
|
|||
Loading…
Reference in New Issue