fix format bug for elsestme and stmt def in .g4
This commit is contained in:
@@ -155,7 +155,7 @@ std::any ASTPrinter::visitStmt(SysYParser::StmtContext *ctx){
|
||||
cout << getIndent() << "}" << endl;
|
||||
}
|
||||
if (ctx->stmt().size() > 1) {
|
||||
cout << getIndent() << "else" << endl;
|
||||
cout << getIndent() << "else";
|
||||
if(ctx->stmt(1)->blockStmt())ctx->stmt(1)->accept(this);
|
||||
else{
|
||||
cout << " {"<< endl;
|
||||
|
||||
Reference in New Issue
Block a user