Changeset 936e243 in tol


Ignore:
Timestamp:
Mar 3, 2009, 9:44:52 AM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
5f2f46b
Parents:
c5f245d
Message:

Separating NameBlock father from current that is used for scope rules.
Themes related to father and full name are now solved in operator = (BEqualOperator::Evaluate)

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

File:
1 edited

Legend:

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

    rc5f245d r936e243  
    545545  BGrammar* newGrammar = NIL;
    546546  BBool enableCasting=BTRUE;
     547  bool isCreatingNameBlock = BEqualOperator::IsCreatingNameBlock();
    547548  BToken* tok  = BParser::treToken(tre);
    548549  if(!tok || BGrammar::StopFlag()) { return(NIL); }
    … …  
    781782    if(unb->HasName() && (own!=unb))
    782783    {
    783       if(unb->Name()=="root")
    784         printf("");
    785784      BNameBlock& nb = unb->Contens();
    786785      if(!own || (own->Level()>unb->Level()))
    787786      {
    788787        nb.PutOwner(unb);
     788        nb.PutLocalName(unb->Name());
    789789        BText fatherName = "";
    790         const BNameBlock* father = nb.Father();
    791         if(father && father->EnsureIsAssigned())
     790        if(isCreatingNameBlock)
    792791        {
    793           fatherName = nb.Father()->Name();
     792          fatherName = BEqualOperator::CurrentFatherName();
    794793        }
    795         nb.PutLocalName(unb->Name());
    796794        nb.RebuildFullNameDeep(fatherName);
    797795      }
Note: See TracChangeset for help on using the changeset viewer.