fix missing indent on elif and case generation bug
This commit is contained in:
parent
2afd8b20c6
commit
f4907b4e4d
1 changed files with 2 additions and 2 deletions
|
|
@ -149,7 +149,7 @@ std::string if_block::generate(int ind)
|
||||||
if(i==0)
|
if(i==0)
|
||||||
ret += "if";
|
ret += "if";
|
||||||
else
|
else
|
||||||
ret += "elif";
|
ret += indented("elif", ind);
|
||||||
|
|
||||||
if(blocks[i].first->size()==1)
|
if(blocks[i].first->size()==1)
|
||||||
ret += ' ' + blocks[i].first->generate(ind+1, false);
|
ret += ' ' + blocks[i].first->generate(ind+1, false);
|
||||||
|
|
@ -296,7 +296,7 @@ std::string case_block::generate(int ind)
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove ;; from last case
|
// remove ;; from last case
|
||||||
if(opt_minimize)
|
if(this->cases.size()>0 && opt_minimize)
|
||||||
{
|
{
|
||||||
ret.erase(ret.size()-3, 2);
|
ret.erase(ret.size()-3, 2);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue