本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}