Skip to content

Commit ff18571

Browse files
committed
Fix for to_string of expressions.
1 parent f2fbe55 commit ff18571

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/parse.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2196,7 +2196,9 @@ auto postfix_expression_node::to_string() const
21962196

21972197
for (auto const& x : ops) {
21982198
assert (x.op);
2199-
ret += x.op->as_string_view();
2199+
if(x.op->as_string_view() != "(") { // Brackets are handled by the expression list.
2200+
ret += x.op->as_string_view();
2201+
}
22002202
if (x.id_expr) {
22012203
ret += x.id_expr->to_string();
22022204
}

0 commit comments

Comments
 (0)