Changeset 7c62e8b in tol


Ignore:
Timestamp:
Feb 4, 2009, 9:23:23 AM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
a2f5d0f
Parents:
7e2783d
Message:

Updates owner relation of NameBlock's

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

File:
1 edited

Legend:

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

    r7e2783d r7c62e8b  
    738738//TRACE_SHOW_LOW(fun,BText("End with result type: ")<<BText((result!=NULL)?result->Grammar()->Name():BText("NULL")));
    739739  TRACE_SHOW_LOW(fun,"END");
     740  if(result && (result->Grammar()==GraNameBlock()))
     741  {
     742    BUserNameBlock* unb = (BUserNameBlock*)result;
     743    BUserNameBlock* own = unb->Contens().Owner();
     744    if(unb->HasName() && (own!=unb))
     745    {
     746      if(unb->Name()=="root")
     747        printf("");
     748      BNameBlock& nb = unb->Contens();
     749      if(!own || (own->Level()>unb->Level()))
     750      {
     751        nb.PutOwner(unb);
     752        BText fatherName = "";
     753        const BNameBlock* father = nb.Father();
     754        if(father && father->EnsureIsAssigned())
     755        {
     756          fatherName = nb.Father()->Name();
     757        }
     758        nb.PutLocalName(unb->Name());
     759        nb.RebuildFullNameDeep(fatherName);
     760      }
     761    }
     762  }
    740763  return(result);
    741764}
Note: See TracChangeset for help on using the changeset viewer.