Changeset 8cf5460 in tol


Ignore:
Timestamp:
Sep 1, 2009, 8:34:27 AM (17 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
ba0d09c
Parents:
15936a6d
Message:

Searching for static members and methods of classes

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@1290 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/bgrammar/graacc.cpp

    r15936a6d r8cf5460  
    495495/* */
    496496  const BClass* cls = BClass::currentClassBuildingInstance_;
    497   if(!found && cls && (this==GraCode()))
    498   {
    499     BSyntaxObject* met = cls->FindMethod(name);
    500     if(met)
     497  BSyntaxObject* met = NULL;
     498  if(cls && (this==GraCode())) 
     499  {
     500    met = cls->FindMethod(name,true);
     501  }
     502  else if(cls = BClass::currentStatic_)
     503  {
     504    met = cls->FindStatic(name,true);
     505  }
     506  if(!found && met)
     507  {
     508    if((met->Mode()==BUSERFUNMODE)&&(this==GraCode()))
    501509    {
    502       if(met->Mode()==BUSERFUNMODE)
    503       {
    504         opr = (BOperator*)met;
    505         found = opr->GetCode();
    506       }
    507       else if(met->Mode()==BOBJECTMODE)
    508       {
    509         found = met;
    510       }
    511     }
     510      opr = (BOperator*)met;
     511      found = opr->GetCode();
     512    }
     513    else if(met->Mode()==BOBJECTMODE)
     514    {
     515      found = met;
     516    }
    512517  }
    513518/* */
    … …  
    622627/* */
    623628  const BClass* cls = BClass::currentClassBuildingInstance_;
    624   if(cls)
    625   {
    626     BSyntaxObject* met = cls->FindMethod(name);
    627     if(met)
     629  BSyntaxObject* met = NULL;
     630  if(cls) 
     631  {
     632    met = cls->FindMethod(name,true);
     633  }
     634  else if(cls = BClass::currentStatic_)
     635  {
     636    met = cls->FindStatic(name,true);
     637  }
     638  if(met)
     639  {
     640    if(met->Mode()==BUSERFUNMODE)
    628641    {
    629       if(met->Mode()==BUSERFUNMODE)
    630       {
    631         found = (BOperator*)met;
    632       }
    633       else if(met->Mode()==BOBJECTMODE)
    634       {
    635         BUserCode* uCode = UCode(met);
    636         found = uCode->Contens().Operator();
    637       }
    638     }
    639   }
     642      found = (BOperator*)met;
     643    }
     644    else if(met->Mode()==BOBJECTMODE)
     645    {
     646      BUserCode* uCode = UCode(met);
     647      found = uCode->Contens().Operator();
     648    }
     649  }
    640650/* */
    641651  if(!found)
Note: See TracChangeset for help on using the changeset viewer.