Getting the body of if loop using AstMatcher

I am currently stumped on how to get / copy the body of a if loop out. Any help would be appreciated.

Much Thanks,

John Tan

I am currently stumped on how to get / copy the body of a if loop out. Any
help would be appreciated.

The hasThen() matcher lets you match on the true branch of an if
statement, while the hasElse() matcher lets you match on the false
branch, so perhaps something like
ifStmt(hasThen(what_you_are_interested_in())) is what you're looking
for.

~Aaron