-/* code.c
+/* mklib.c
File to generate builtin.c
- Copyright (c) 2008 Matthias Kramm <kramm@quiss.org>
+ Copyright (c) 2008,2009 Matthias Kramm <kramm@quiss.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return "classinfo_t";
} else if(s->kind == INFOTYPE_METHOD) {
return "methodinfo_t";
- } else if(s->kind == INFOTYPE_SLOT) {
+ } else if(s->kind == INFOTYPE_VAR) {
return "varinfo_t";
}
+ return "**ERROR**";
}
void write_slotinfo(FILE*fi, slotinfo_t*s, char*id, char*prefix);
void write_slotinfo(FILE*fi, slotinfo_t*s, char*id, char*prefix)
{
- if(s->kind == INFOTYPE_SLOT) {
+ if(s->kind == INFOTYPE_VAR) {
varinfo_t*v = (varinfo_t*)s;
if(v->value) {
write_constant(fi, v->value, id, prefix);
fprintf(fi, "0"); // params TODO
fprintf(fi, "};\n");
}
- if(s->kind == INFOTYPE_SLOT) {
+ if(s->kind == INFOTYPE_VAR) {
varinfo_t*m = (varinfo_t*)s;
fprintf(fi, "%s, ", mkptr(m->type));
fprintf(fi, "%s, ", mkptr(m->parent));
fprintf(fi, " _Infinity_constant.f = __builtin_inf();\n");
fprintf(fi, " return d;\n");
fprintf(fi, "}\n");
-
+ return 0;
}