Changeset a64730a in tol for toltcl/generic/tolaccess.cpp


Ignore:
Timestamp:
Jan 26, 2009, 10:17:08 AM (18 years ago)
Author:
Jorge Pérez <josp.jorge@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
556df52
Parents:
c61d3f9
Message:

TT_FindOperator : use LeftEvaluate in order to apply ::

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • toltcl/generic/tolaccess.cpp

    rc61d3f9 ra64730a  
    3636#include <tol/tol_bnameblock.h>
    3737#include <tol/tol_bspfun.h>
     38#include <tol/tol_bcodgra.h>
    3839#include <tol/tol_bsetgra.h>
    3940#include <tol/tol_btsrgra.h>
    … …  
    16491650}
    16501651
     1652static
     1653BOperator* TT_FindOperator( const BGrammar *G, const char *expr )
     1654{
     1655  BOperator* opr = G->FindOperator( expr );
     1656  if ( opr ) {
     1657    return opr;
     1658  }
     1659  bool oldEnabled = BOut::Disable();
     1660  BSyntaxObject* obj = GraCode( )->BGrammar::LeftEvaluateExpr( expr );
     1661  if( oldEnabled ) { BOut::Enable( ); }
     1662  BUserCode *uc = dynamic_cast<BUserCode*>( obj );
     1663 
     1664  return
     1665    ( uc && ( uc->Contens().Grammar( ) == G ) ) ? uc->Contens().Operator( ) : NULL;
     1666}
     1667
    16511668/*
    16521669 * Fill in obj_result the function's prototype and description
    … …  
    16961713    if (gra) {
    16971714      Tcl_DStringInit(&dstr);
    1698       Tcl_UtfToExternalDString(NULL,Tcl_GetString(fun_name),-1,&dstr);
    1699       BOperator* opr = gra->FindOperator(Tcl_DStringValue(&dstr));
     1715      Tcl_UtfToExternalDString( NULL, Tcl_GetString( fun_name ), -1, &dstr );
     1716      BOperator* opr = TT_FindOperator( gra, Tcl_DStringValue( &dstr ) );
    17001717      Tcl_DStringFree(&dstr);
    17011718      if (opr) {
Note: See TracChangeset for help on using the changeset viewer.