Properly parenthesise unary operators
This commit is contained in:
parent
409fc4dc19
commit
88816e150a
|
|
@ -655,12 +655,14 @@ vhdl_unaryop_expr::~vhdl_unaryop_expr()
|
|||
|
||||
void vhdl_unaryop_expr::emit(std::ostream &of, int level) const
|
||||
{
|
||||
of << "(";
|
||||
switch (op_) {
|
||||
case VHDL_UNARYOP_NOT:
|
||||
of << "not ";
|
||||
break;
|
||||
}
|
||||
operand_->emit(of, level);
|
||||
of << ")";
|
||||
}
|
||||
|
||||
vhdl_binop_expr::vhdl_binop_expr(vhdl_expr *left, vhdl_binop_t op,
|
||||
|
|
|
|||
Loading…
Reference in New Issue