public AstRoot getAstRoot ( ) { AstNode parent = this ; // this node could be the AstRoot while ( parent != null && ! ( parent instanceof AstRoot ) ) { parent = parent . getParent ( ) ; } return ( AstRoot ) parent ; }
Returns the root of the tree containing this node .