fix a bug of issue1
This commit is contained in:
@@ -90,7 +90,10 @@ std::any ASTPrinter::visitFuncDef(SysYParser::FuncDefContext *ctx){
|
|||||||
cout << getIndent() << ctx->funcType()->getText() << ' ' << ctx->Ident()->getText();
|
cout << getIndent() << ctx->funcType()->getText() << ' ' << ctx->Ident()->getText();
|
||||||
cout << ctx->LPAREN()->getText();
|
cout << ctx->LPAREN()->getText();
|
||||||
if (ctx->funcFParams()) ctx->funcFParams()->accept(this);
|
if (ctx->funcFParams()) ctx->funcFParams()->accept(this);
|
||||||
cout << ctx->RPAREN()->getText();
|
if(ctx->RPAREN())
|
||||||
|
cout << ctx->RPAREN()->getText();
|
||||||
|
else
|
||||||
|
cout << "<missing \')\'?>";
|
||||||
ctx->blockStmt()->accept(this);
|
ctx->blockStmt()->accept(this);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user