Changeset 7333f89 in tol
- Timestamp:
- Jul 21, 2009, 11:33:53 AM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 1e7e8f0
- Parents:
- d57f819
- Location:
- tol/btol/bgrammar
- Files:
-
- 2 edited
-
nameblock.cpp (modified) (5 diffs)
-
tol_bnameblock.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/bgrammar/nameblock.cpp
rd57f819 r7333f89 49 49 BTraceInit("nameblock.cpp"); 50 50 51 const BNameBlock* BNameBlock::current_ = NULL; 52 BNameBlock* BNameBlock::unknown_ = NULL; 51 const BNameBlock* BNameBlock::current_ = NULL; 52 const BNameBlock* BNameBlock::building_ = NULL; 53 BNameBlock* BNameBlock::unknown_ = NULL; 53 54 BObjClassify BObjClassify::null_; 54 55 BObjByNameHash BNameBlock::using_; … … 278 279 const BNameBlock* old = current_; 279 280 current_ = ns; 280 return(current_); 281 } 281 return(ns); 282 } 283 284 //-------------------------------------------------------------------- 285 const BNameBlock* BNameBlock::Building() 286 //-------------------------------------------------------------------- 287 { 288 if(building_ && 289 building_->createdWithNew_ && 290 !(BFSMEM_Hndlr->IsAssigned(building_,building_->_bfsm_PageNum__))) 291 { 292 BFSMEM_Hndlr->IsAssigned(building_,building_->_bfsm_PageNum__); 293 building_ = NULL; 294 } 295 return(building_); 296 } 297 298 //-------------------------------------------------------------------- 299 const BNameBlock* BNameBlock::SetBuilding(const BNameBlock* ns) 300 //-------------------------------------------------------------------- 301 { 302 const BNameBlock* old = building_; 303 building_ = ns; 304 return(ns); 305 } 306 307 308 282 309 283 310 //-------------------------------------------------------------------- … … 324 351 newNameBlock.PutName(fullName); 325 352 newNameBlock.PutLocalName(name); 353 const BNameBlock* oldBuilding = BNameBlock::SetBuilding(&newNameBlock); 326 354 int oldErr = (int)TOLErrorNumber().Value(); 327 355 BSyntaxObject* set_result = NULL; … … 378 406 { 379 407 BMember* mbr = newNameBlock.member_[n]->member_; 380 //Std(BText("\nTRACE BNameBlock::EvaluateTree member ")+381 //fullName+"::"+newNameBlock.member_[n]->member_->name_);408 Std(BText("\nTRACE BNameBlock::EvaluateTree member ")+ 409 fullName+"::"+newNameBlock.member_[n]->member_->name_); 382 410 BSyntaxObject* obj = GraAnything()->EvaluateTree(mbr->branch_); 383 411 if(!obj) … … 437 465 DESTROY(set_result); 438 466 } 467 BNameBlock::SetBuilding(oldBuilding); 439 468 } 440 469 return(ns_result); -
tol/btol/bgrammar/tol_bnameblock.h
rd57f819 r7333f89 53 53 BClass* class_; 54 54 static const BNameBlock* current_; 55 static const BNameBlock* building_; 55 56 static BNameBlock* unknown_; 56 57 static BObjByNameHash using_; … … 69 70 static const BNameBlock* Current(); 70 71 static const BNameBlock* SetCurrent(const BNameBlock* ns); 72 static const BNameBlock* Building(); 73 static const BNameBlock* SetBuilding(const BNameBlock* ns); 71 74 static BSyntaxObject* EvaluateTree(const List* tre); 72 75 static bool Using (const BSyntaxObject* uns);
Note: See TracChangeset
for help on using the changeset viewer.
