Changeset 990c4f3 in tol
- Timestamp:
- Apr 8, 2009, 7:46:45 AM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 4c00cc7
- Parents:
- 1737efa
- File:
-
- 1 edited
-
tol/btol/bgrammar/oprimp.cpp (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/btol/bgrammar/oprimp.cpp
r1737efa r990c4f3 539 539 str=NULL; 540 540 cls = NULL; 541 rest = NULL; 541 542 if((tok->TokenType() == TYPE)) 542 543 { … … 568 569 else if((tok->TokenType()==BINARY)&&(tok->Name()=="::")) 569 570 { 571 //BText expr = BParser::Unparse(left); 572 //Std(BText("Unparse(left)=\n")<<BParser::Unparse(left)+"\n"); 570 573 List* nbLst = Tree::treLeft(left); 571 BToken* nbTok = BParser::treToken(nbLst); 572 const BText& nbName = nbTok->Name(); 573 BUserNameBlock* unb = (BUserNameBlock*)GraNameBlock()->FindOperand(nbName,false); 574 //Std(BText("Unparse(nbLst)=\n")<<BParser::Unparse(nbLst)+"\n"); 575 BUserNameBlock* unb = (BUserNameBlock*)GraNameBlock()->LeftEvaluateTree(nbLst); 574 576 if(unb) 575 577 { … … 672 674 { 673 675 TRACE_SHOW_MEDIUM(fun," 6"); 674 result = BGrammar::FindLocal(name); 675 TRACE_SHOW_MEDIUM(fun," 7"); 676 if(result && (result->Level()!=level)) { result = NIL; } 676 677 if(!BEqualOperator::CreatingName().HasName()) 678 { 679 result = BNameBlock::LocalMember(name); 680 if(result && result->NameBlock()) 681 { 682 Warning(I2("Local variable","La variable local")+ 683 " "+gra->Name()+" "+name+" "+ 684 I2("hides published NameBlock member", 685 "oculta el miembro de NameBlock publicado")+ 686 " "+result->FullName()); 687 BUserFunction::ShowCallStack(); 688 result = NULL; 689 } 690 } 691 if(!result) 692 { 693 result = BGrammar::FindLocal(name); 694 TRACE_SHOW_MEDIUM(fun," 7"); 695 if(result && (result->Level()!=level)) { result = NIL; } 696 } 677 697 } 678 else result = gra->FindVariable(name); 679 if(result && result->NameBlock()) 680 { 681 Warning(I2("Global variable","La variable global")+ 682 " "+gra->Name()+" "+name+" "+ 683 I2("hides published NameBlock member", 684 "oculta el miembro de NameBlock publicado")+ 685 " "+result->FullName()); 686 result = NULL; 698 else 699 { 700 result = gra->FindVariable(name); 701 if(result && result->NameBlock()) 702 { 703 Warning(I2("Global variable","La variable global")+ 704 " "+gra->Name()+" "+name+" "+ 705 I2("hides published NameBlock member", 706 "oculta el miembro de NameBlock publicado")+ 707 " "+result->FullName()); 708 result = NULL; 709 } 687 710 } 688 711 if(result) // send an error messages … … 691 714 BText functionName = ""; 692 715 BText functionPath = ""; 693 BText sentence = result-> Description();716 BText sentence = result->FullName() + " " +result->Description(); 694 717 # ifdef WINDOWS 695 718 path += BText("\n")+SysPath(path); … … 711 734 I2("' already defined as ", 712 735 "' ya definida como \"") + sentence + "\"\n"); 713 }736 } 714 737 else 715 738 { … … 844 867 { 845 868 currentFullName_ = currentFullName_ + "::" +name; 869 //Std(BText("\nTRACE currentFullName_ <- ")<<currentFullName_+"\n"); 846 870 } 847 871 else 848 872 { 849 873 currentFullName_ = name; 874 //Std(BText("\nTRACE currentFullName_ <- ")<<currentFullName_+"\n"); 850 875 } 851 876 creatingClass_ = cls; … … 853 878 if(!rest && gra) 854 879 { 855 if(defInst) 856 { 857 result = CreateObject(left, gra, name); 858 } 859 else 860 { 861 result = CreateObject(left, gra, name); 862 } 880 result = CreateObject(left, gra, name); 863 881 if(str && result) 864 882 { … … 887 905 if(isNameBlock) 888 906 { 889 currentFullName_ = currentFatherName_; 907 currentFullName_ = oldFullName; 908 //Std(BText("\nTRACE currentFullName_ <- ")<<currentFullName_+"\n"); 890 909 creatingName_ = oldName; 891 910 creatingClass_ = oldClass; … … 1425 1444 BStruct* str = NIL; 1426 1445 BClass* cls = NIL; 1446 bool carIsList = dec->car()->IsListClass(); 1447 List* decLst = carIsList?Tree::treNode((List*) dec):(List*)dec; 1427 1448 BGrammar* gra = GetLeft 1428 1449 ( 1429 NIL, Tree::treNode(dec),1450 NIL, decLst, 1430 1451 names_[n], rest, str, cls 1431 1452 );
Note: See TracChangeset
for help on using the changeset viewer.
