if_diff/src/idfAst.cxx
//============================================================================
// Return the n-th child of this AST node, 0-indexed.
//============================================================================
Return the n-th child of this AST node, 0-indexed.
Return the n - th child of this AST node 0 - indexed .
idfAst *idfAstSiblings::getSibling(int n) const
{
  if (n < 0) {
    return NULL;
  }
  for (idfAst *sib = first; sib != NULL; sib = sib->nextSib) {
    if (--n < 0) {
      return sib;
    }
  }
  return NULL;
}
idfAst * idfAstSiblings :: getSibling ( int n ) const { if ( n < 0 ) { return NULL ; } for ( idfAst * sib = first ; sib != NULL ; sib = sib -> nextSib ) { if ( -- n < 0 ) { return sib ; } } return NULL ; }
Return the n-th child of this AST node, 0-indexed.
Return the n - th child of this AST node 0 - indexed .