mirror of
https://github.com/Z3Prover/z3
synced 2026-05-28 21:06:29 +00:00
smt2parser: realign pop_app_frame non-expr_head else block indentation (#9646)
This updates a formatting regression introduced in the `pop_app_frame`
non-`expr_head` path, where block indentation made control flow harder
to read. The patch is whitespace-only and keeps parser behavior
unchanged.
- **What changed**
- Reindented the `else` body in
`src/parsers/smt2/smt2parser.cpp::pop_app_frame` so nested `if/else`
structure is visually unambiguous.
- Removed trailing spaces on the `m_ctx.mk_app(symbol("select"), ...)`
lines in the same block.
- **Scope**
- No control-flow, data-flow, or API changes.
- No changes outside `pop_app_frame`.
```cpp
// Before
else {
local l;
if (m_env.find(fr->m_f, l)) {
...
}
else {
...
}
}
// After
else {
local l;
if (m_env.find(fr->m_f, l)) {
...
}
else {
...
}
}
```
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
parent
b3fff5b399
commit
1564e00215
1 changed files with 23 additions and 23 deletions
|
|
@ -2008,32 +2008,32 @@ namespace smt2 {
|
|||
}
|
||||
}
|
||||
else {
|
||||
local l;
|
||||
if (m_env.find(fr->m_f, l)) {
|
||||
push_local(l);
|
||||
t_ref = expr_stack().back();
|
||||
for (unsigned i = 0; i < num_args; ++i) {
|
||||
expr* arg = expr_stack().get(fr->m_expr_spos + i);
|
||||
expr* args[2] = { t_ref.get(), arg };
|
||||
m_ctx.mk_app(symbol("select"),
|
||||
2,
|
||||
args,
|
||||
0,
|
||||
nullptr,
|
||||
nullptr,
|
||||
local l;
|
||||
if (m_env.find(fr->m_f, l)) {
|
||||
push_local(l);
|
||||
t_ref = expr_stack().back();
|
||||
for (unsigned i = 0; i < num_args; ++i) {
|
||||
expr* arg = expr_stack().get(fr->m_expr_spos + i);
|
||||
expr* args[2] = { t_ref.get(), arg };
|
||||
m_ctx.mk_app(symbol("select"),
|
||||
2,
|
||||
args,
|
||||
0,
|
||||
nullptr,
|
||||
nullptr,
|
||||
t_ref);
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_ctx.mk_app(fr->m_f,
|
||||
num_args,
|
||||
expr_stack().data() + fr->m_expr_spos,
|
||||
num_indices,
|
||||
m_param_stack.data() + fr->m_param_spos,
|
||||
fr->m_as_sort ? sort_stack().back() : nullptr,
|
||||
t_ref);
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_ctx.mk_app(fr->m_f,
|
||||
num_args,
|
||||
expr_stack().data() + fr->m_expr_spos,
|
||||
num_indices,
|
||||
m_param_stack.data() + fr->m_param_spos,
|
||||
fr->m_as_sort ? sort_stack().back() : nullptr,
|
||||
t_ref);
|
||||
}
|
||||
}
|
||||
expr_stack().shrink(fr->m_expr_spos);
|
||||
m_param_stack.shrink(fr->m_param_spos);
|
||||
if (fr->m_as_sort)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue