From e7822ec397e1bd645b7c668abf0a81f2d5cb4795 Mon Sep 17 00:00:00 2001 From: Teddy Date: Sat, 5 Apr 2014 11:45:01 +0800 Subject: bug fixes --- semantics.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'semantics.h') diff --git a/semantics.h b/semantics.h index 9136ebb..aed73de 100644 --- a/semantics.h +++ b/semantics.h @@ -80,6 +80,7 @@ CTable_t ctable_create(Hashfunc_t hfunc, Printfunc_t pfunc); #else CTable_t ctable_create(Hashfunc_t hfunc); #endif +void ctable_destroy(CTable_t ct); void *ctable_lookup(CTable_t ct, const char *key); int ctable_insert(CTable_t ct, const char *key, void *val, int lvl); void ctable_clip(CTable_t ct, const char *key, int max_lvl); @@ -104,9 +105,11 @@ typedef struct CSNode { typedef struct CScope *CScope_t; typedef struct CScope { int lvl; + CType_t func; + int inside_loop; struct CSNode *top; - struct CTable *tvar; - struct CTable *ttype; + CTable_t tvar; + CTable_t ttype; } CScope; typedef struct ExpType { -- cgit v1.2.3