+#include <stdlib.h>
+#include <string.h>
+
+#include "list.h"
+#include "scc.h"
#include "ast.h"
void type_error(const char *msg, ...)
struct decl *type_decl(struct decl *decl)
{
switch (decl->type) {
- case dcomponent:
+ case dcomp:
fprintf(stderr, "type_decl:component unsupported\n");
break;
case dfundecl:
struct ast *type(struct ast *ast)
{
+ ast = ast_scc(ast);
+
for (int i = 0; i<ast->ndecls; i++) {
if (ast->decls[i]->type == dvardecl) {
//Check globals
}
return ast;
}
-