Skip to content

Commit

Permalink
updated detection of when parenthesis can be omitted to cover empty a…
Browse files Browse the repository at this point in the history
…nd epsilon
  • Loading branch information
veanes committed Aug 14, 2020
1 parent ae41336 commit e80b143
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ast/seq_decl_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ void seq_util::re::pp::compact_helper_range(std::ostream& out, expr* s1, expr* s
*/
bool seq_util::re::pp::can_skip_parenth(expr* r) {
expr* s;
return ((re.is_to_re(r, s) && re.u.str.is_unit(s)) || re.is_range(r));
return ((re.is_to_re(r, s) && re.u.str.is_unit(s)) || re.is_range(r) || re.is_empty(r) || re.is_epsilon(r));
}

/*
Expand Down

0 comments on commit e80b143

Please sign in to comment.