Changeset c0b3749 in tol
- Timestamp:
- Sep 1, 2009, 8:38:59 AM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 8d67ff3
- Parents:
- 83ac76d
- Location:
- tol/btol/bgrammar
- Files:
-
- 3 edited
-
opr.cpp (modified) (2 diffs)
-
oprimp.cpp (modified) (4 diffs)
-
tol_boper.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/bgrammar/opr.cpp
r83ac76d rc0b3749 851 851 definition_ (NIL), 852 852 declare_(""), 853 define_("") 853 define_(""), 854 staticOwner_(NULL) 854 855 { 855 856 PutName(name); … … 874 875 definition_ (NIL), 875 876 declare_(""), 876 define_("") 877 define_(""), 878 staticOwner_(NULL) 877 879 { 878 880 PutName(name); 879 881 PutDescription(name); 880 882 SetExpression(dec, def); 881 882 883 } 883 884 -
tol/btol/bgrammar/oprimp.cpp
r83ac76d rc0b3749 674 674 { 675 675 TRACE_SHOW_MEDIUM(fun," 6"); 676 676 /* 677 677 if(!BEqualOperator::CreatingName().HasName()) 678 678 { … … 689 689 } 690 690 } 691 */ 691 692 if(!result) 692 693 { … … 1434 1435 1435 1436 //-------------------------------------------------------------------- 1437 BText BUserFunction::FullName() const 1438 1439 /*! Returns a text with all important information about this operator 1440 */ 1441 //-------------------------------------------------------------------- 1442 { 1443 if(staticOwner_) { return(staticOwner_->FullName()+"::"+Name()); } 1444 else { return(BSyntaxObject::FullName()); } 1445 } 1446 1447 1448 //-------------------------------------------------------------------- 1436 1449 BText BUserFunction::Dump() const 1437 1450 … … 1613 1626 const BNameBlock* oldNameBlock = BNameBlock::Current(); 1614 1627 const BNameBlock* funNameBlock = NameBlock(); 1615 bool change = (funNameBlock || !Level() ) && (funNameBlock != oldNameBlock); 1616 if(change) 1617 { 1618 /*Std(BText("\nBUserFunction::Evaluator ")+FullName()+ 1619 " changing new current NameBlock to "+ 1620 (funNameBlock?funNameBlock->Name():"NULL")+"\n");*/ 1628 const BClass* oldStaticOwner = BClass::currentStatic_; 1629 if(funNameBlock) 1630 { 1621 1631 BNameBlock::SetCurrent(funNameBlock); 1632 BClass::currentStatic_ = funNameBlock->Class(); 1633 } 1634 else 1635 { 1636 BClass::currentStatic_ = staticOwner_; 1622 1637 } 1623 1638 result = Grammar()->EvaluateTree(definition_, 1); 1624 if(change) 1625 { 1626 /*Std(BText("\nBUserFunction::Evaluator ")+FullName()+ 1627 " recovering old current NameBlock to "+ 1628 (oldNameBlock?oldNameBlock->Name():"NULL")+"\n");*/ 1629 BNameBlock::SetCurrent(oldNameBlock); 1630 } 1639 BClass::currentStatic_ = oldStaticOwner; 1640 BNameBlock::SetCurrent(oldNameBlock); 1631 1641 } 1632 1642 if(result) -
tol/btol/bgrammar/tol_boper.h
r83ac76d rc0b3749 414 414 BArray<BSyntaxObject*> lastCalling_; 415 415 BArray<BText> names_; 416 416 417 417 public: 418 const BClass* staticOwner_; 419 418 420 // Constructors and destructors: opr.cpp 419 421 BUserFunction(const BText& name, BGrammar* gra); … … 429 431 BInt Mode() const { return BUSERFUNMODE; }; 430 432 431 BText Dump() const; 433 BText FullName() const; 434 BText Dump () const; 432 435 433 436 const List* Declaration() const { return(declaration_); }
Note: See TracChangeset
for help on using the changeset viewer.
