Changeset 70a78b2 in tol


Ignore:
Timestamp:
Mar 19, 2012, 8:52:30 AM (15 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
f74a7e6
Parents:
e8b0203
Message:

Fixes #1487

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

Location:
tol/btol/bgrammar
Files:
2 edited

Legend:

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

    re8b0203 r70a78b2  
    10041004
    10051005//--------------------------------------------------------------------
     1006static bool isSpecial(const BText& name)
     1007//--------------------------------------------------------------------
     1008{
     1009  return(name=="StartActions");
     1010}
     1011
     1012//--------------------------------------------------------------------
    10061013bool BNameBlock::add_using_symbol(
    10071014  const BText& name,
    10081015  BObjByNameHash::const_iterator iter,
    10091016  bool usingAlsoReadOnly,
    1010   bool usingAlsoPrivate
     1017  bool usingAlsoPrivate,
     1018  bool usingAlsoSpecial
    10111019)
    10121020//--------------------------------------------------------------------
    … …  
    10171025    if(!usingAlsoPrivate  && ((iter->first)[1]!='.')) { return(true); }
    10181026  }
     1027  if(!usingAlsoSpecial && isSpecial(name)) { return(true); }
    10191028  bool ok = true;
    10201029  BObjByNameHash::const_iterator found ;
    … …  
    10581067    const BSyntaxObject* obj,
    10591068    bool usingAlsoReadOnly,
    1060     bool usingAlsoPrivate)
     1069    bool usingAlsoPrivate,
     1070    bool usingAlsoSpecial)
    10611071//--------------------------------------------------------------------
    10621072{
    … …  
    10841094  for(iter=pbm.begin(); iter!=pbm.end(); iter++)
    10851095  {
    1086     ok = add_using_symbol(name, iter, false, false);
     1096    ok = add_using_symbol(name, iter, false, false, usingAlsoSpecial);
    10871097  }
    10881098  BObjByNameHash& prm = ns.Private();
    10891099  for(iter=prm.begin(); iter!=prm.end(); iter++)
    10901100  {
    1091     ok = add_using_symbol(name, iter, usingAlsoReadOnly, usingAlsoPrivate);
     1101    ok = add_using_symbol(name, iter,
     1102     usingAlsoReadOnly, usingAlsoPrivate, usingAlsoSpecial);
    10921103  }
    10931104  return(ok);
    … …  
    16981709      bool usingAlsoReadOnly = false;
    16991710      bool usingAlsoPrivate = false;
     1711      bool usingAlsoSpecial = false;
    17001712      if(lst && lst->Car())
    17011713      {
    … …  
    17081720        lst = lst->Cdr();
    17091721      }
    1710       contens_ = BNameBlock::Using(uns_,usingAlsoReadOnly,usingAlsoPrivate);
     1722      if(lst && lst->Car())
     1723      {
     1724        usingAlsoSpecial = Real(lst->Car())!=0.0;
     1725        lst = lst->Cdr();
     1726      }
     1727      contens_ = BNameBlock::Using(uns_,usingAlsoReadOnly,usingAlsoPrivate,usingAlsoSpecial);
    17111728    }
    17121729  }
    … …  
    17221739
    17231740//--------------------------------------------------------------------
    1724   DefExtOpr(1, BDatUsingNameBlock, "UsingNameBlock",1,3,
     1741  DefExtOpr(1, BDatUsingNameBlock, "UsingNameBlock",1,4,
    17251742  "NameBlock Real Real",
    17261743  "(NameBlock nameBlock [, "
    17271744    "Real usingAlsoReadOnly = False,"
    1728     "Real usingAlsoPrivate = False])",
     1745    "Real usingAlsoPrivate = False,"
     1746    "Real usingAlsoSpecial = False])",
    17291747  I2("In certain circumstances the public members of a NameBlock can "
    17301748     "pass to the global scope, that is to say, it is possible to "
    … …  
    17491767     "If usingAlsoPrivate is true then private members will be "
    17501768     "also exported.\n"
     1769     "If usingAlsoSpecial is true then special members and methods "
     1770     "as StartActions of packages will be also exported.\n"
    17511771     ,
    17521772     "En determinadas circunstancias los miembros públicos de un "
    … …  
    17701790     "también serán exportados.\n"
    17711791     "Si usingAlsoPrivate es cierto los miembros privados "
    1772      "también serán exportados.\n"),
     1792     "también serán exportados.\n"
     1793     "Si usingAlsoSpecial es cierto los miembros y métodos especiales "
     1794     "como StartActions también serán exportados.\n"),
    17731795  BOperClassify::System_);
    17741796
  • tol/btol/bgrammar/tol_bnameblock.h

    re8b0203 r70a78b2  
    103103    const BSyntaxObject* uns,
    104104    bool usingAlsoReadOnly,
    105     bool usingAlsoPrivate);
     105    bool usingAlsoPrivate,
     106    bool usingAlsoSpecial);
    106107  static void Unusing(const BSyntaxObject* uns);
    107108  static BSyntaxObject* LocalMember(const BText& memberName);
    … …  
    177178    BObjByNameHash::const_iterator iter,
    178179    bool usingAlsoReadOnly,
    179     bool usingAlsoPrivate
     180    bool usingAlsoPrivate,
     181    bool usingAlsoSpecial
    180182  );
    181183};
Note: See TracChangeset for help on using the changeset viewer.