Changeset dea29fb in tol
- Timestamp:
- Dec 10, 2009, 11:00:45 AM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 2adcbae
- Parents:
- 2fb8329
- Location:
- tol/btol/bgrammar
- Files:
-
- 5 edited
-
class.cpp (modified) (4 diffs)
-
nameblock.cpp (modified) (2 diffs)
-
oprimp.cpp (modified) (1 diff)
-
syn.cpp (modified) (1 diff)
-
tol_bsyntax.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/bgrammar/class.cpp
r2fb8329 rdea29fb 229 229 { 230 230 isGood_ = false; 231 Error(I2("Wrong syntax in member declaration ",232 "Sintaxis incorrecta en declaración de miembro ")+231 Error(I2("Wrong syntax in member declaration \n", 232 "Sintaxis incorrecta en declaración de miembro \n")+ 233 233 BParser::Unparse(branch_,"","\n")+ 234 234 I2(" of Class ", " de Class ")+parent->getName()); 235 235 } 236 if(isGood_ && declaration_.BeginWith("Code") && !isMethod_) 237 { 238 Warning(I2("Potential failure due to a non standard use of OOP:\n" 239 "A class should have no members of type Code as \n", 240 "Error potencial debido a un uso no estándar de OOP:\n" 241 "Una clase no debería tener miembros de tipo Code como \n")+ 242 BParser::Unparse(branch_,"","\n")+ 243 I2(" of Class ", " de Class ")+parent->getName()); 244 } 236 245 if(parent->OwnerType()==BMemberOwner::BCLASS) 237 246 { … … 240 249 } 241 250 } 242 243 251 244 252 //-------------------------------------------------------------------- … … 295 303 method_ = obj; 296 304 method_->IncNRefs(); 305 method_->PutMethod(); 306 BUserCode* uCode = UCode(method_); 307 uCode->Contens().Operator()->PutMethod(); 297 308 return(1); 298 309 } … … 906 917 if(!ok) 907 918 { 908 Error(I2("Wrong syntax on member area of Class declaration",919 Error(I2("Wrong syntax on member area of declaration ", 909 920 "Sintaxis errónea en el área de de miembros de " 910 "declaración de Class")+ getDump());921 "declaración de ")+ getDump()); 911 922 } 912 923 isGood_ = ok; -
tol/btol/bgrammar/nameblock.cpp
r2fb8329 rdea29fb 167 167 //-------------------------------------------------------------------- 168 168 { 169 int n; 169 170 owner_ = NULL; 171 for(n=1; n<=set_.Card(); n++) 172 { 173 set_[n]->PutNameBlock(NULL); 174 } 170 175 public_.clear(); 171 176 private_.clear(); … … 683 688 if((nonPrivateMembers_==0)&&!class_) 684 689 { 685 Warning(I2("A NameBlock should have at least a public or read only member.", 686 "Un NameBlock debería tener al menos un miembro público o de sólo lectura.")); 690 Warning(BText("NameBlock ")+Name()+" "+ 691 I2("should have at least a public or read only member.", 692 "debería tener al menos un miembro público o de sólo lectura.")); 687 693 return(false); 688 694 } -
tol/btol/bgrammar/oprimp.cpp
r2fb8329 rdea29fb 1632 1632 if(arglistOK) 1633 1633 { 1634 const BClass* oldStaticOwner = BClass::currentStatic_; 1634 1635 const BNameBlock* oldNameBlock = BNameBlock::Current(); 1635 1636 const BNameBlock* funNameBlock = NameBlock(); 1636 const BClass* oldStaticOwner = BClass::currentStatic_; 1637 if(funNameBlock && funNameBlock->Class() && !IsMethod()) 1638 { 1639 funNameBlock = NULL; 1640 } 1641 if(funNameBlock && !funNameBlock->EnsureIsAssigned()) 1642 { 1643 if(!funNameBlock->Class()) 1644 { 1645 Error(BText("Corrupted method ")+Identify()+"\n" 1646 "Possibly this problem is due to a non standard use of OOP, if " 1647 "this function was assigned to a member of type Code of a " 1648 "NameBlock or Class instance that has been destroyed already."); 1649 } 1650 funNameBlock = NULL; 1651 } 1637 1652 if(funNameBlock) 1638 1653 { -
tol/btol/bgrammar/syn.cpp
r2fb8329 rdea29fb 176 176 PutSystem(!TOLHasBeenInitialized()); 177 177 flags_.isConst_= false; 178 flags_.isMethod_ = false; 178 179 if(flags_.system_) { IncNRefs(); IncNRefs(); IncNRefs(); } 179 180 TRACE_MEMORY_SHOW(this, "BSyntaxObject::InitSynObj"); -
tol/btol/bgrammar/tol_bsyntax.h
r2fb8329 rdea29fb 118 118 bool isDeadObj_ :1; //!< Indicates if object is a false or dead object 119 119 bool isConst_ :1; //!< Indicates if object value is constant or variable 120 bool isMethod_ :1; //!< Indicates if object is a method of a class 120 121 } flags_; 121 122 … … 200 201 bool IsDeadObj () const { return(flags_.isDeadObj_); } 201 202 bool IsConstant () const { return(flags_.isConst_); } 203 bool IsMethod () const { return(flags_.isMethod_); } 202 204 int Ems () const { return(ems_); } 203 205 … … 212 214 void PutReleased() { flags_.released_ = true; } 213 215 void PutConstant() { flags_.isConst_ = true; } 216 void PutMethod() { flags_.isMethod_ = true; } 214 217 void PutEms (int ems) { ems_ = ems; } 215 218
Note: See TracChangeset
for help on using the changeset viewer.
