Example #1
0
File: type.c Project: Pastor/fcc
type* typeCreateFunction (type* returnType, type** paramTypes, int params, bool variadic) {
    type* DT = typeCreate(typeFunction);
    DT->returnType = returnType;
    DT->paramTypes = paramTypes;
    DT->params = params;
    DT->variadic = variadic;
    return DT;
}
Example #2
0
File: type.c Project: Fedjmike/tush
type* typeUnitary (typeSys* ts, typeKind kind) {
    precond(!typeKindIsntUnitary(kind));

    /*Only allocate one struct per unitary type*/
    if (!ts->unitaries[kind])
        ts->unitaries[kind] = typeCreate(kind, (type) {});

    return ts->unitaries[kind];
}
Example #3
0
File: type.c Project: Fedjmike/tush
static type* typeNonUnitary (typeSys* ts, typeKind kind, type init) {
    type* dt = typeCreate(kind, init);
    vectorPush(&ts->others, dt);
    return dt;
}
Example #4
0
File: type.c Project: Pastor/fcc
type* typeCreateInvalid () {
    return typeCreate(typeInvalid);
}
Example #5
0
File: type.c Project: Pastor/fcc
type* typeCreateArray (type* base, int size) {
    type* DT = typeCreate(typeArray);
    DT->base = base;
    DT->array = size;
    return DT;
}
Example #6
0
File: type.c Project: Pastor/fcc
type* typeCreatePtr (type* base) {
    type* DT = typeCreate(typePtr);
    DT->base = base;
    return DT;
}
Example #7
0
File: type.c Project: Pastor/fcc
type* typeCreateBasic (const sym* basic) {
    type* DT = typeCreate(typeBasic);
    DT->basic = basic;
    return DT;
}