vhdlpp: Distinguish character and an array of bits during emission.
This commit is contained in:
parent
1c4b1c12e4
commit
9886b8cb36
|
|
@ -453,17 +453,16 @@ int ExpCharacter::emit_primitive_bit_(ostream&out, Entity*, ScopeBase*,
|
|||
int ExpCharacter::emit(ostream&out, Entity*ent, ScopeBase*scope)
|
||||
{
|
||||
const VType*etype = peek_type();
|
||||
const VTypeArray*array;
|
||||
|
||||
if (etype != &primitive_CHARACTER && (array = dynamic_cast<const VTypeArray*>(etype))) {
|
||||
etype = array->element_type();
|
||||
}
|
||||
|
||||
if (const VTypePrimitive*use_type = dynamic_cast<const VTypePrimitive*>(etype)) {
|
||||
return emit_primitive_bit_(out, ent, scope, use_type);
|
||||
}
|
||||
|
||||
if (const VTypeArray*array = dynamic_cast<const VTypeArray*>(etype)) {
|
||||
if (const VTypePrimitive*use_type = dynamic_cast<const VTypePrimitive*>(array->element_type())) {
|
||||
return emit_primitive_bit_(out, ent, scope, use_type);
|
||||
}
|
||||
}
|
||||
|
||||
out << "\"" << value_ << "\"";
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue