void (*Set)(void *, void *) = (void *)prop.Set;
exp.instance = Instantiation { };
exp.instance.data = new0 byte[_class.structSize];
- exp.instance._class = MkSpecifierName/*MkClassName*/(_class.fullName);
+ exp.instance._class = MkSpecifierName(_class.fullName);
exp.instance.loc = exp.loc;
exp.type = instanceExp;
Set(exp.instance.data, value.instance.data);
exp.instance = Instantiation { };
exp.instance.data = new0 byte[_class.structSize];
- exp.instance._class = MkSpecifierName/*MkClassName*/(_class.fullName);
+ exp.instance._class = MkSpecifierName(_class.fullName);
exp.instance.loc = exp.loc;
exp.type = instanceExp;
exp.instance = Instantiation { };
exp.instance.data = new0 byte[_class.structSize];
- exp.instance._class = MkSpecifierName/*MkClassName*/(_class.fullName);
+ exp.instance._class = MkSpecifierName(_class.fullName);
exp.instance.loc = exp.loc;
exp.type = instanceExp;
exp.instance = Instantiation { };
exp.instance.data = new0 byte[_class.structSize];
- exp.instance._class = MkSpecifierName/*MkClassName*/(_class.fullName);
+ exp.instance._class = MkSpecifierName(_class.fullName);
exp.instance.loc = exp.loc;
exp.type = instanceExp;
PopulateInstance(exp.instance);
break;
}
+ case floatType:
+ {
+ float floatValue;
+ void (*Set)(void *, float) = (void *)prop.Set;
+
+ exp.instance = Instantiation { };
+ exp.instance.data = new0 byte[_class.structSize];
+ exp.instance._class = MkSpecifierName(_class.fullName);
+ exp.instance.loc = exp.loc;
+ exp.type = instanceExp;
+
+ GetFloat(value, &floatValue);
+
+ Set(exp.instance.data, floatValue);
+ PopulateInstance(exp.instance);
+ break;
+ }
case doubleType:
{
double doubleValue;
exp.instance = Instantiation { };
exp.instance.data = new0 byte[_class.structSize];
- exp.instance._class = MkSpecifierName/*MkClassName*/(_class.fullName);
+ exp.instance._class = MkSpecifierName(_class.fullName);
exp.instance.loc = exp.loc;
exp.type = instanceExp;
exp.instance = Instantiation { };
exp.instance.data = new0 byte[_class.structSize];
- exp.instance._class = MkSpecifierName/*MkClassName*/(_class.fullName);
+ exp.instance._class = MkSpecifierName(_class.fullName);
exp.instance.loc = exp.loc;
//exp.instance.fullSet = true;
exp.type = instanceExp;
exp.instance = Instantiation { };
exp.instance.data = new0 byte[_class.structSize];
- exp.instance._class = MkSpecifierName/*MkClassName*/(_class.fullName);
+ exp.instance._class = MkSpecifierName(_class.fullName);
exp.instance.loc = exp.loc;
//exp.instance.fullSet = true;
exp.type = instanceExp;
{
FreeInstance(inst);
}
-
- //ComputeInstantiation(exp);
break;
}
/*
float value;
float (*Get)(float) = (void *) (convertTo ? prop.Set : prop.Get);
GetFloat(memberExp, &value);
+
+ FreeExpContents(exp);
exp.constant = PrintFloat(Get ? Get(value) : value);
exp.type = constantExp;
exp.isConstant = true;
double value;
double (*Get)(double) = (void *) (convertTo ? prop.Set : prop.Get);
GetDouble(memberExp, &value);
+
+ FreeExpContents(exp);
exp.constant = PrintDouble(Get ? Get(value) : value);
exp.isConstant = true;
exp.type = constantExp;
{
Expression value = memberExp;
Type type = prop.dataType;
+ exp.member.exp = null;
+
if(_class.type == structClass)
{
switch(type.kind)
if(propertyClass.type == structClass && value.type == instanceExp)
{
void (*Set)(void *, void *) = (void *)prop.Set;
+ FreeExpContents(exp);
exp.instance = Instantiation
{
data = new0 byte[_class.structSize];
int intValue;
void (*Set)(void *, int) = (void *)prop.Set;
+ GetInt(value, &intValue);
+ FreeExpContents(exp);
exp.instance = Instantiation
{
data = new0 byte[_class.structSize];
};
exp.type = instanceExp;
- GetInt(value, &intValue);
-
Set(exp.instance.data, intValue);
PopulateInstance(exp.instance);
supported = true;
int64 intValue;
void (*Set)(void *, int64) = (void *)prop.Set;
+ GetInt64(value, &intValue);
+ FreeExpContents(exp);
exp.instance = Instantiation
{
data = new0 byte[_class.structSize];
};
exp.type = instanceExp;
- GetInt64(value, &intValue);
-
Set(exp.instance.data, intValue);
PopulateInstance(exp.instance);
supported = true;
break;
}
+ case floatType:
+ {
+ float floatValue;
+ void (*Set)(void *, float) = (void *)prop.Set;
+
+ GetFloat(value, &floatValue);
+ FreeExpContents(exp);
+ exp.instance = Instantiation
+ {
+ data = new0 byte[_class.structSize];
+ _class = MkSpecifierName/*MkClassName*/(_class.name);
+ loc = exp.loc;
+ };
+ exp.type = instanceExp;
+
+ Set(exp.instance.data, floatValue);
+ PopulateInstance(exp.instance);
+ supported = true;
+ break;
+ }
case doubleType:
{
double doubleValue;
void (*Set)(void *, double) = (void *)prop.Set;
+ GetDouble(value, &doubleValue);
+ FreeExpContents(exp);
exp.instance = Instantiation
{
data = new0 byte[_class.structSize];
};
exp.type = instanceExp;
- GetDouble(value, &doubleValue);
-
Set(exp.instance.data, doubleValue);
PopulateInstance(exp.instance);
supported = true;
{
unsigned int (*Set)(void *) = (void *)prop.Set;
unsigned int bits = Set(value.instance.data);
+ FreeExpContents(exp);
exp.constant = PrintHexUInt(bits);
exp.type = constantExp;
supported = true;
GetUInt(memberExp, &value);
bits = Set(value);
+ FreeExpContents(exp);
exp.constant = PrintHexUInt(bits);
exp.type = constantExp;
supported = true;
}
}
}
+ FreeExpression(value);
}
else
{
{
void (*Get)(unsigned int, void *) = (void *)prop.Get;
+ FreeExpContents(exp);
exp.instance = Instantiation
{
data = new0 byte[_class.structSize];
else if(_class.type == structClass)
{
char * value = (memberExp.type == instanceExp ) ? memberExp.instance.data : null;
+ if(value)
+ memberExp.instance.data = null;
+
switch(type.kind)
{
case classType:
{
void (*Get)(void *, void *) = (void *)prop.Get;
+ FreeExpContents(exp);
exp.instance = Instantiation
{
data = new0 byte[_class.structSize];
break;
}
}
+
+ delete value;
}
/*else
{
{
void *(*Get)(void *) = (void *)prop.Get;
+ FreeExpContents(exp);
exp.instance = Instantiation
{
data = Get(value, exp.instance.data); ?????
}
if(!supported)
{
+ FreeExpContents(exp);
exp.type = memberPropertyErrorExp;
exp.isConstant = false;
}