当前位置: 首页>>代码示例>>C++>>正文


C++ HB_COMP_EXPR_NEW函数代码示例

本文整理汇总了C++中HB_COMP_EXPR_NEW函数的典型用法代码示例。如果您正苦于以下问题:C++ HB_COMP_EXPR_NEW函数的具体用法?C++ HB_COMP_EXPR_NEW怎么用?C++ HB_COMP_EXPR_NEW使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了HB_COMP_EXPR_NEW函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: hb_compExprNewHash

/* Creates a new literal hash { key1=>val1, key2=>val2, ... keyN=>valN }
 *    'pHashList' is a list of hash items
 */
PHB_EXPR hb_compExprNewHash( PHB_EXPR pHashList, HB_COMP_DECL )
{
   PHB_EXPR pExpr;

   HB_TRACE( HB_TR_DEBUG, ( "hb_compExprNewHash()" ) );

   if( pHashList )
      pHashList->ExprType = HB_ET_HASH;   /* change type from ET_LIST */
   else
   {
      pHashList = HB_COMP_EXPR_NEW( HB_ET_HASH );
      pHashList->value.asList.pExprList = NULL;
   }
   pHashList->ValType = HB_EV_HASH;
   pHashList->nLength = 0;
   pHashList->value.asList.reference = HB_FALSE;
   pHashList->value.asList.pIndex    = NULL;

   /*
    * replace all EO_NONE expressions with ET_NIL expressions and
    * calculate the list length
    */
   pExpr = pHashList->value.asList.pExprList;
   while( pExpr )
   {
      if( pExpr->ExprType == HB_ET_NONE )
         pExpr->ExprType = HB_ET_NIL;
      pExpr = pExpr->pNext;
      ++pHashList->nLength;
   }

   return pHashList;
}
开发者ID:jlsiug,项目名称:harbour-core,代码行数:36,代码来源:expropt1.c

示例2: hb_compExprNewMacroSend

/* Creates new macro send expression
 *    : &<msg> -> ( expression )
 */
PHB_EXPR hb_compExprNewMacroSend( PHB_EXPR pMessage, HB_COMP_DECL )
{
   PHB_EXPR pExpr;

   HB_TRACE( HB_TR_DEBUG, ( "hb_compExprNewMacroSend(%p,%p)", pMessage, HB_COMP_PARAM ) );

   pExpr = HB_COMP_EXPR_NEW( HB_ET_SEND );
   pExpr->value.asMessage.pObject = NULL;
   pExpr->value.asMessage.pParms  = NULL;

   pExpr->value.asMessage.szMessage = NULL;
   pExpr->value.asMessage.pMessage  = pMessage;

   pExpr->nLength = 0;

   if( pMessage->ExprType == HB_ET_MACRO )
   {
      /* Signal that macro compiler have to generate a pcode that will
       * return function name as symbol instead of usual value
       */
      pMessage->value.asMacro.SubType = HB_ET_MACRO_SYMBOL;
   }

   return pExpr;
}
开发者ID:jlsiug,项目名称:harbour-core,代码行数:28,代码来源:expropt1.c

示例3: hb_compExprNewEqual

PHB_EXPR hb_compExprNewEqual( PHB_EXPR pLeftExpr, HB_COMP_DECL )
{
   PHB_EXPR pExpr = HB_COMP_EXPR_NEW( HB_EO_EQUAL );

   pExpr->value.asOperator.pLeft  = pLeftExpr;
   pExpr->value.asOperator.pRight = NULL;
   return pExpr;
}
开发者ID:jlsiug,项目名称:harbour-core,代码行数:8,代码来源:expropt1.c

示例4: hb_compExprNewPreDec

PHB_EXPR hb_compExprNewPreDec( PHB_EXPR pLeftExpr, HB_COMP_DECL )
{
   PHB_EXPR pExpr = HB_COMP_EXPR_NEW( HB_EO_PREDEC );

   pExpr->value.asOperator.pLeft  = pLeftExpr;
   pExpr->value.asOperator.pRight = NULL;
   return pExpr;
}
开发者ID:jlsiug,项目名称:harbour-core,代码行数:8,代码来源:expropt1.c

示例5: hb_compExprNewMultEq

PHB_EXPR hb_compExprNewMultEq( PHB_EXPR pLeftExpr, HB_COMP_DECL )
{
   PHB_EXPR pExpr = HB_COMP_EXPR_NEW( HB_EO_MULTEQ );

   pExpr->value.asOperator.pLeft  = pLeftExpr;
   pExpr->value.asOperator.pRight = NULL;
   return pExpr;
}
开发者ID:jlsiug,项目名称:harbour-core,代码行数:8,代码来源:expropt1.c

示例6: hb_compExprNewAlias

/* Create a new symbol used in an alias expressions
 */
PHB_EXPR hb_compExprNewAlias( const char * szName, HB_COMP_DECL )
{
   PHB_EXPR pExpr;

   HB_TRACE( HB_TR_DEBUG, ( "hb_compExprNewAlias(%s,%p)", szName, HB_COMP_PARAM ) );

   pExpr = HB_COMP_EXPR_NEW( HB_ET_ALIAS );
   pExpr->value.asSymbol.name = szName;
   return pExpr;
}
开发者ID:jlsiug,项目名称:harbour-core,代码行数:12,代码来源:expropt1.c

示例7: hb_compExprNewVar

PHB_EXPR hb_compExprNewVar( const char * szName, HB_COMP_DECL )
{
   PHB_EXPR pExpr;

   HB_TRACE( HB_TR_DEBUG, ( "hb_compExprNewVar(%s,%p)", szName, ( void * ) HB_COMP_PARAM ) );

   pExpr = HB_COMP_EXPR_NEW( HB_ET_VARIABLE );
   pExpr->value.asSymbol.name = szName;
   return pExpr;
}
开发者ID:alcz,项目名称:harbour,代码行数:10,代码来源:expropt1.c

示例8: hb_compExprNewSelf

PHB_EXPR hb_compExprNewSelf( HB_COMP_DECL )
{
   PHB_EXPR pExpr;

   HB_TRACE( HB_TR_DEBUG, ( "hb_compExprNewSelf(%p)", HB_COMP_PARAM ) );

   pExpr = HB_COMP_EXPR_NEW( HB_ET_SELF );

   pExpr->ValType = HB_EV_OBJECT;
   return pExpr;
}
开发者ID:jlsiug,项目名称:harbour-core,代码行数:11,代码来源:expropt1.c

示例9: hb_compExprNewArgList

/* Creates a list of function call arguments
 */
PHB_EXPR hb_compExprNewArgList( PHB_EXPR pFirstItem, HB_COMP_DECL )
{
   PHB_EXPR pExpr;

   HB_TRACE( HB_TR_DEBUG, ( "hb_compExprNewArgList()" ) );

   pExpr = HB_COMP_EXPR_NEW( HB_ET_ARGLIST );
   pExpr->value.asList.pExprList = pFirstItem;
   pExpr->value.asList.reference = HB_FALSE;
   return pExpr;
}
开发者ID:jlsiug,项目名称:harbour-core,代码行数:13,代码来源:expropt1.c

示例10: hb_compExprNewArgRef

/* Creates a reference to variable arguments
 */
PHB_EXPR hb_compExprNewArgRef( HB_COMP_DECL )
{
   PHB_EXPR pExpr;

   HB_TRACE( HB_TR_DEBUG, ( "hb_compExprNewArgRef()" ) );

   pExpr = HB_COMP_EXPR_NEW( HB_ET_ARGLIST );
   pExpr->value.asList.pExprList = NULL;
   pExpr->value.asList.reference = HB_TRUE;
   return pExpr;
}
开发者ID:jlsiug,项目名称:harbour-core,代码行数:13,代码来源:expropt1.c

示例11: hb_compExprNewNil

PHB_EXPR hb_compExprNewNil( HB_COMP_DECL )
{
   PHB_EXPR pExpr;

   HB_TRACE( HB_TR_DEBUG, ( "hb_compExprNewNil(%p)", HB_COMP_PARAM ) );

   pExpr = HB_COMP_EXPR_NEW( HB_ET_NIL );

   pExpr->ValType = HB_EV_NIL;
   return pExpr;
}
开发者ID:jlsiug,项目名称:harbour-core,代码行数:11,代码来源:expropt1.c

示例12: hb_compExprNewRef

PHB_EXPR hb_compExprNewRef( PHB_EXPR pRefer, HB_COMP_DECL )
{
   PHB_EXPR pExpr;

   HB_TRACE( HB_TR_DEBUG, ( "hb_compExprNewRef(%p,%p)", pRefer, HB_COMP_PARAM ) );

   pExpr = HB_COMP_EXPR_NEW( HB_ET_REFERENCE );

   pExpr->value.asReference = pRefer;
   pExpr->ValType = HB_EV_VARREF;
   return pExpr;
}
开发者ID:jlsiug,项目名称:harbour-core,代码行数:12,代码来源:expropt1.c

示例13: hb_compExprNewVarRef

PHB_EXPR hb_compExprNewVarRef( const char * szVarName, HB_COMP_DECL )
{
   PHB_EXPR pExpr;

   HB_TRACE( HB_TR_DEBUG, ( "hb_compExprNewVarRef(%s,%p)", szVarName, HB_COMP_PARAM ) );

   pExpr = HB_COMP_EXPR_NEW( HB_ET_VARREF );

   pExpr->value.asSymbol.name = szVarName;
   pExpr->ValType = HB_EV_VARREF;
   return pExpr;
}
开发者ID:jlsiug,项目名称:harbour-core,代码行数:12,代码来源:expropt1.c

示例14: hb_compExprNewFunName

/* Create a new symbol used in function calls
 */
PHB_EXPR hb_compExprNewFunName( const char * szName, HB_COMP_DECL )
{
   PHB_EXPR pExpr;

   HB_TRACE( HB_TR_DEBUG, ( "hb_compExprNewFunName(%s,%p)", szName, HB_COMP_PARAM ) );

   pExpr = HB_COMP_EXPR_NEW( HB_ET_FUNNAME );
   pExpr->value.asSymbol.name = hb_compGetFuncID( szName,
                                                  &pExpr->value.asSymbol.funcid,
                                                  &pExpr->value.asSymbol.flags );
   return pExpr;
}
开发者ID:jlsiug,项目名称:harbour-core,代码行数:14,代码来源:expropt1.c

示例15: hb_compExprAssign

/* Handles (expression := expression) syntax
 */
PHB_EXPR hb_compExprAssign( PHB_EXPR pLeftExpr, PHB_EXPR pRightExpr,
                            HB_COMP_DECL )
{
   PHB_EXPR pExpr;

   HB_TRACE( HB_TR_DEBUG, ( "hb_compExprAssign()" ) );

   pExpr = HB_COMP_EXPR_NEW( HB_EO_ASSIGN );
   pExpr->value.asOperator.pLeft  = pLeftExpr;
   pExpr->value.asOperator.pRight = pRightExpr;
   return pExpr;
}
开发者ID:jlsiug,项目名称:harbour-core,代码行数:14,代码来源:expropt1.c


注:本文中的HB_COMP_EXPR_NEW函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。