Commit afdb0b45 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[ast] Actually print the try-block in AstPrinter.

This fixes a refactoring bug in the AstPrinter to actually print the
try-block of {TryCatchStatement} and {TryFinallyStatement} nodes.

R=neis@chromium.org

Change-Id: I6448251c1eed3f85100902592a76dc7d3a614334
Reviewed-on: https://chromium-review.googlesource.com/571748Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46670}
parent e24abc9d
......@@ -880,6 +880,7 @@ void AstPrinter::VisitForOfStatement(ForOfStatement* node) {
void AstPrinter::VisitTryCatchStatement(TryCatchStatement* node) {
IndentedScope indent(this, "TRY CATCH", node->position());
PrintIndentedVisit("TRY", node->try_block());
PrintIndented("CATCH PREDICTION");
const char* prediction = "";
switch (node->GetCatchPrediction(HandlerTable::UNCAUGHT)) {
......@@ -908,6 +909,7 @@ void AstPrinter::VisitTryCatchStatement(TryCatchStatement* node) {
void AstPrinter::VisitTryFinallyStatement(TryFinallyStatement* node) {
IndentedScope indent(this, "TRY FINALLY", node->position());
PrintIndentedVisit("TRY", node->try_block());
PrintIndentedVisit("FINALLY", node->finally_block());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment