Changeset c31ee19 in tol


Ignore:
Timestamp:
Feb 24, 2011, 4:41:02 PM (16 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
c585b86
Parents:
fd127bc
Message:

Fixes #1104

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@3247 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/bgrammar/spfuninst.cpp

    rfd127bc rc31ee19  
    18141814    {
    18151815      BStruct* str = (BStruct*)result;
    1816       result = str->Function()->Evaluate(branch2->cdr());
    1817       DESTROY(str);
     1816      BSyntaxObject* instance = str->Function()->Evaluate(branch2->cdr());
     1817      if(instance)
     1818      {
     1819        result = instance;
     1820        DESTROY(str);
     1821      }
    18181822    }
    18191823    if(result && (tt==TYPE)&&(result->Mode()==BCLASSMODE))
    18201824    {
    18211825      BClass* cls = (BClass*)result;
    1822       result = GraNameBlock()->EvaluateTree(branch2->cdr());
    1823       BUserNameBlock* unb = NULL;
    1824       if(result && (result->Grammar()==GraNameBlock()))
    1825       {
    1826         unb = (BUserNameBlock*)result;
    1827       }
    1828       if(!unb || (unb->Contens().Class()!=cls))
    1829       {
    1830         errMsg = I2("It was expected an instance of Class ",
    1831                  "Se esperaba una instancia de Class ") +cls->Name();
    1832         DESTROY(result);
    1833         result=NULL;
    1834       }
    1835       DESTROY(cls);
     1826      BSyntaxObject* instance = GraNameBlock()->EvaluateTree(branch2->cdr());
     1827      if(instance)
     1828      { 
     1829        result = instance;
     1830        BUserNameBlock* unb = NULL;
     1831        if(result && (result->Grammar()==GraNameBlock()))
     1832        {
     1833          unb = (BUserNameBlock*)result;
     1834        }
     1835        if(!unb || (unb->Contens().Class()!=cls))
     1836        {
     1837          errMsg = I2("It was expected an instance of Class ",
     1838                   "Se esperaba una instancia de Class ") +cls->Name();
     1839          DESTROY(result);
     1840          result=NULL;
     1841        }
     1842        DESTROY(cls);
     1843      }
    18361844    }
    18371845  }
    … …  
    18561864  //Std(BText("\nEvMember branch2='")+BParser::Unparse(branch2,"  ")+"'\n");
    18571865    int nObject0 = BSyntaxObject::NSyntaxObject();
    1858   //Std(BText("\nTRACE EvMember BEGIN NObject=")+nObject0+" tre='"+ups+"'\n");
     1866    Std(BText("\nTRACE EvMember BEGIN NObject=")+nObject0+" tre='"+ups+"'\n");
    18591867/* */
    18601868  BSyntaxObject* result = NIL;
Note: See TracChangeset for help on using the changeset viewer.