You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
470 B
30 lines
470 B
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <malloc.h>
|
|
#include <string.h>
|
|
|
|
#include <expValue.h>
|
|
#include <cast.h>
|
|
|
|
s_expVal *
|
|
castExprToInt(s_expVal * eVal)
|
|
{
|
|
return expValueIntNew(expValueInt (eVal));
|
|
}
|
|
|
|
s_expVal *
|
|
castExprToFloat(s_expVal * eVal)
|
|
{
|
|
return expValueFloatNew(expValueFloat (eVal));
|
|
}
|
|
|
|
s_expVal *
|
|
castExprToString(s_expVal * eVal)
|
|
{
|
|
char * val = expValueString(eVal);
|
|
s_expVal * ret = expValueStringNew(val);
|
|
|
|
free(val);
|
|
|
|
return ret;
|
|
}
|