Skip to content

Commit 6415658

Browse files
author
Daniel Kroening
committed
format_expr now produces unicode
1 parent 01b7418 commit 6415658

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/util/format_expr.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,21 @@ static std::ostream &format_rec(std::ostream &os, const multi_ary_exprt &src)
6262
{
6363
bool first = true;
6464

65+
std::string operator_str;
66+
67+
if(src.id() == ID_and)
68+
operator_str = u8"\u2227"; // wedge, U+2227
69+
else if(src.id() == ID_or)
70+
operator_str = u8"\u2228"; // vee, U+2228
71+
else if(src.id() == ID_le)
72+
operator_str = u8"\u2264"; // <=, U+2264
73+
else if(src.id() == ID_ge)
74+
operator_str = u8"\u2265"; // >=, U+2265
75+
else if(src.id() == ID_notequal)
76+
operator_str = u8"\u2260"; // /=, U+2260
77+
else
78+
operator_str = id2string(src.id());
79+
6580
for(const auto &op : src.operands())
6681
{
6782
if(first)
@@ -95,7 +110,7 @@ static std::ostream &format_rec(std::ostream &os, const binary_exprt &src)
95110
static std::ostream &format_rec(std::ostream &os, const unary_exprt &src)
96111
{
97112
if(src.id() == ID_not)
98-
os << '!';
113+
os << u8"\u00ac"; // neg, U+00AC
99114
else if(src.id() == ID_unary_minus)
100115
os << '-';
101116
else

0 commit comments

Comments
 (0)