Fix a couple of bugs.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4406 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
56131015c6
commit
986d21f10c
2 changed files with 15 additions and 11 deletions
|
@ -4818,8 +4818,8 @@ QCC_def_t *QCC_PR_ParseArrayPointer (QCC_def_t *d, pbool allowarrayassign)
|
||||||
else
|
else
|
||||||
idx = tmp;
|
idx = tmp;
|
||||||
}
|
}
|
||||||
t = t->params[i].type;
|
|
||||||
arraysize = t->params[i].arraysize;
|
arraysize = t->params[i].arraysize;
|
||||||
|
t = t->params[i].type;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -3862,18 +3862,22 @@ QCC_type_t *QCC_PR_ParseType (int newtype, pbool silentfail)
|
||||||
if (QCC_PR_CheckToken ("."))
|
if (QCC_PR_CheckToken ("."))
|
||||||
{
|
{
|
||||||
newt = QCC_PR_NewType("FIELD_TYPE", ev_field, false);
|
newt = QCC_PR_NewType("FIELD_TYPE", ev_field, false);
|
||||||
newt->aux_type = QCC_PR_ParseType (false, false);
|
|
||||||
|
|
||||||
newt->size = newt->aux_type->size;
|
//.float *foo; is annoying.
|
||||||
|
//technically it is a pointer to a .float
|
||||||
|
//most people will want a .(float*) foo;
|
||||||
|
//so .*float will give you that.
|
||||||
|
//however, we can't cope parsing that with regular types, so we support that ONLY when . was already specified.
|
||||||
|
//this is pretty much an evil syntax hack.
|
||||||
|
if (QCC_PR_CheckToken ("*"))
|
||||||
|
{
|
||||||
|
newt->aux_type = QCC_PR_NewType("POINTER TYPE", ev_pointer, false);
|
||||||
|
newt->aux_type->aux_type = QCC_PR_ParseType (false, false);
|
||||||
|
|
||||||
if (newtype)
|
newt->aux_type->size = newt->aux_type->aux_type->size;
|
||||||
return newt;
|
}
|
||||||
return QCC_PR_FindType (newt);
|
else
|
||||||
}
|
newt->aux_type = QCC_PR_ParseType (false, false);
|
||||||
if (QCC_PR_CheckToken ("*"))
|
|
||||||
{
|
|
||||||
newt = QCC_PR_NewType("POINTER TYPE", ev_pointer, false);
|
|
||||||
newt->aux_type = QCC_PR_ParseType (false, false);
|
|
||||||
|
|
||||||
newt->size = newt->aux_type->size;
|
newt->size = newt->aux_type->size;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue