Changeset 360 in dev


Ignore:
Timestamp:
Nov 9, 2007, 8:52:10 AM (17 years ago)
Author:
dai_9181
Message:
 
Location:
trunk/jenga
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/jenga/include/smoothie/LexicalAnalysis.h

    r341 r360  
    3434bool SplitMemberName( const char *desc, char *object, char *member, ReferenceKind &refType );
    3535bool SplitMemberName( const char *desc, char *object, char *member );
     36void SplitSyntacticForAs( const char *src, char *varName, char *typeName);
    3637void GetCalcName(int idCalc,char *name);
    3738BYTE ToCalcId( const char *name );
  • trunk/jenga/src/smoothie/LexicalAnalysis.cpp

    r341 r360  
    301301    ReferenceKind dummyRefType;
    302302    return SplitMemberName( desc, object, member, dummyRefType );
     303}
     304
     305void SplitSyntacticForAs( const char *src, char *varName, char *typeName)
     306{
     307    int i = 0;
     308    for( ; ; i++ )
     309    {
     310        if( src[i] == '\0' || src[i] == 1 && src[i+1] == ESC_AS )
     311        {
     312            varName[i] = 0;
     313            break;
     314        }
     315        varName[i] = src[i];
     316    }
     317
     318    if( src[i] )
     319    {
     320        i += 2;
     321        lstrcpy( typeName, src + i );
     322    }
     323    else
     324    {
     325        typeName[i] = 0;
     326    }
    303327}
    304328
Note: See TracChangeset for help on using the changeset viewer.