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
|
||||
idx = tmp;
|
||||
}
|
||||
t = t->params[i].type;
|
||||
arraysize = t->params[i].arraysize;
|
||||
t = t->params[i].type;
|
||||
}
|
||||
else
|
||||
break;
|
||||
|
|
|
@ -3862,17 +3862,21 @@ QCC_type_t *QCC_PR_ParseType (int newtype, pbool silentfail)
|
|||
if (QCC_PR_CheckToken ("."))
|
||||
{
|
||||
newt = QCC_PR_NewType("FIELD_TYPE", ev_field, false);
|
||||
newt->aux_type = QCC_PR_ParseType (false, false);
|
||||
|
||||
newt->size = newt->aux_type->size;
|
||||
|
||||
if (newtype)
|
||||
return newt;
|
||||
return QCC_PR_FindType (newt);
|
||||
}
|
||||
//.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 = QCC_PR_NewType("POINTER TYPE", ev_pointer, false);
|
||||
newt->aux_type = QCC_PR_NewType("POINTER TYPE", ev_pointer, false);
|
||||
newt->aux_type->aux_type = QCC_PR_ParseType (false, false);
|
||||
|
||||
newt->aux_type->size = newt->aux_type->aux_type->size;
|
||||
}
|
||||
else
|
||||
newt->aux_type = QCC_PR_ParseType (false, false);
|
||||
|
||||
newt->size = newt->aux_type->size;
|
||||
|
|
Loading…
Reference in a new issue