Changeset 70a78b2 in tol
- Timestamp:
- Mar 19, 2012, 8:52:30 AM (15 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- f74a7e6
- Parents:
- e8b0203
- Location:
- tol/btol/bgrammar
- Files:
-
- 2 edited
-
nameblock.cpp (modified) (9 diffs)
-
tol_bnameblock.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/bgrammar/nameblock.cpp
re8b0203 r70a78b2 1004 1004 1005 1005 //-------------------------------------------------------------------- 1006 static bool isSpecial(const BText& name) 1007 //-------------------------------------------------------------------- 1008 { 1009 return(name=="StartActions"); 1010 } 1011 1012 //-------------------------------------------------------------------- 1006 1013 bool BNameBlock::add_using_symbol( 1007 1014 const BText& name, 1008 1015 BObjByNameHash::const_iterator iter, 1009 1016 bool usingAlsoReadOnly, 1010 bool usingAlsoPrivate 1017 bool usingAlsoPrivate, 1018 bool usingAlsoSpecial 1011 1019 ) 1012 1020 //-------------------------------------------------------------------- … … 1017 1025 if(!usingAlsoPrivate && ((iter->first)[1]!='.')) { return(true); } 1018 1026 } 1027 if(!usingAlsoSpecial && isSpecial(name)) { return(true); } 1019 1028 bool ok = true; 1020 1029 BObjByNameHash::const_iterator found ; … … 1058 1067 const BSyntaxObject* obj, 1059 1068 bool usingAlsoReadOnly, 1060 bool usingAlsoPrivate) 1069 bool usingAlsoPrivate, 1070 bool usingAlsoSpecial) 1061 1071 //-------------------------------------------------------------------- 1062 1072 { … … 1084 1094 for(iter=pbm.begin(); iter!=pbm.end(); iter++) 1085 1095 { 1086 ok = add_using_symbol(name, iter, false, false );1096 ok = add_using_symbol(name, iter, false, false, usingAlsoSpecial); 1087 1097 } 1088 1098 BObjByNameHash& prm = ns.Private(); 1089 1099 for(iter=prm.begin(); iter!=prm.end(); iter++) 1090 1100 { 1091 ok = add_using_symbol(name, iter, usingAlsoReadOnly, usingAlsoPrivate); 1101 ok = add_using_symbol(name, iter, 1102 usingAlsoReadOnly, usingAlsoPrivate, usingAlsoSpecial); 1092 1103 } 1093 1104 return(ok); … … 1698 1709 bool usingAlsoReadOnly = false; 1699 1710 bool usingAlsoPrivate = false; 1711 bool usingAlsoSpecial = false; 1700 1712 if(lst && lst->Car()) 1701 1713 { … … 1708 1720 lst = lst->Cdr(); 1709 1721 } 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); 1711 1728 } 1712 1729 } … … 1722 1739 1723 1740 //-------------------------------------------------------------------- 1724 DefExtOpr(1, BDatUsingNameBlock, "UsingNameBlock",1, 3,1741 DefExtOpr(1, BDatUsingNameBlock, "UsingNameBlock",1,4, 1725 1742 "NameBlock Real Real", 1726 1743 "(NameBlock nameBlock [, " 1727 1744 "Real usingAlsoReadOnly = False," 1728 "Real usingAlsoPrivate = False])", 1745 "Real usingAlsoPrivate = False," 1746 "Real usingAlsoSpecial = False])", 1729 1747 I2("In certain circumstances the public members of a NameBlock can " 1730 1748 "pass to the global scope, that is to say, it is possible to " … … 1749 1767 "If usingAlsoPrivate is true then private members will be " 1750 1768 "also exported.\n" 1769 "If usingAlsoSpecial is true then special members and methods " 1770 "as StartActions of packages will be also exported.\n" 1751 1771 , 1752 1772 "En determinadas circunstancias los miembros públicos de un " … … 1770 1790 "también serán exportados.\n" 1771 1791 "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"), 1773 1795 BOperClassify::System_); 1774 1796 -
tol/btol/bgrammar/tol_bnameblock.h
re8b0203 r70a78b2 103 103 const BSyntaxObject* uns, 104 104 bool usingAlsoReadOnly, 105 bool usingAlsoPrivate); 105 bool usingAlsoPrivate, 106 bool usingAlsoSpecial); 106 107 static void Unusing(const BSyntaxObject* uns); 107 108 static BSyntaxObject* LocalMember(const BText& memberName); … … 177 178 BObjByNameHash::const_iterator iter, 178 179 bool usingAlsoReadOnly, 179 bool usingAlsoPrivate 180 bool usingAlsoPrivate, 181 bool usingAlsoSpecial 180 182 ); 181 183 };
Note: See TracChangeset
for help on using the changeset viewer.
