Changeset 3d1e16b in tol


Ignore:
Timestamp:
Apr 8, 2009, 6:28:46 PM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
11f3712
Parents:
664a9aa
Message:

Allowing member types (with ::) into a Class

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

File:
1 edited

Legend:

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

    r664a9aa r3d1e16b  
    138138    isMethod_ = tok->TokenType()==FUNCTION;
    139139  }
     140  else if((tok->TokenType()==BINARY)&&(tok->Name()=="::"))
     141  {
     142    declaration_ = BParser::Unparse(branch,"","");
     143    BText simpleDec = declaration_;
     144    isMethod_ = simpleDec.Find('(')>=0;
     145    simpleDec.Replace("("," ");
     146    simpleDec.Compact();
     147    int p0 = simpleDec.Find(' ');
     148    if(p0>0)
     149    {
     150      int p1 = simpleDec.Find(' ', p0+1);
     151      if(p1<0) { p1 = simpleDec.Length()+1; }
     152      if(p0+1<p1-1)
     153      {
     154        name_ = simpleDec.SubString(p0+1,p1-1);
     155      }
     156    }
     157  }
    140158  //Cleaning open and close parenthesis
    141159  if(declaration_[0]=='{')
    … …  
    530548    {
    531549      //If it had default value then is replaced by new one
     550    //newMbrNum->position_ = mbrNum->position_;
    532551      memberHash_->erase(name);
    533552      assert(!FindMember(name));
    … …  
    540559    {
    541560      //If it had no default value then is added the new one
     561    //newMbrNum->position_ = mbrNum->position_;
    542562      memberHash_->erase(name);
    543563      assert(!FindMember(name));
    … …  
    906926      if(!result)
    907927      {
    908         cns = cns->Father();
     928      //cns = cns->Father();
     929        cns = NULL;
    909930      }
    910931    }
Note: See TracChangeset for help on using the changeset viewer.