コード例 #1
0
  virtual int NumberForLoops( int actNum)
  {
    if( down != NULL && !keepDown)
      {
	actNum = down->NumberForLoops( actNum);
      }
		
    if( right != NULL && !keepRight)
      {
	actNum = right->NumberForLoops( actNum);
      }
    return actNum;
  }
コード例 #2
0
  static int NumberForLoops( ProgNodeP tree, int offset = 0)
  {
    if( tree == NULL)
      return offset;
		
    return tree->NumberForLoops( offset);
  }
コード例 #3
0
  int NumberForLoops( int actNum)
  {
    this->forLoopIx = actNum;
    actNum++;
    ProgNodeP statementList = this->GetStatementList();
    if( statementList != NULL && !down->KeepRight())
      {
	actNum = statementList->NumberForLoops( actNum);
      }
    if( right != NULL && !keepRight)
      {
	actNum = right->NumberForLoops( actNum);
      }
    return actNum;
  }