#pragma once #include "ir.h" #include "type.h" enum symbol_type { ST_VAR, ST_FUNC }; struct pair_tn { struct type *type; char *name; }; struct symbol { char *name; enum symbol_type stype; struct type *rtype; struct ref ref; int numparams; struct pair_tn *params; }; struct symbol* symbol_make_var(char *name, struct type *rtype); struct symbol* symbol_make_func(char *name, struct type *rtype, int numparams);