@ CheckForNull private DetailAST getExprAst ( @ Nonnull final DetailAST pAst ) { DetailAST result = null ; for ( DetailAST a = pAst . getFirstChild ( ) ; a != null ; a = a . getNextSibling ( ) ) { if ( a . getType ( ) != TokenTypes . LPAREN && a . getType ( ) != TokenTypes . RPAREN ) { result = a ; break ; } } return result ; }
Find the meaningful child of an EXPR AST . This is usually the only child present but it may be surrounded by parentheses .