From 042d8cf2f62b92abc8b14ab88a09c875a265d585 Mon Sep 17 00:00:00 2001 From: Teddy Date: Tue, 29 Apr 2014 23:42:01 +0800 Subject: renaming now works --- semantics.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'semantics.h') diff --git a/semantics.h b/semantics.h index a6c4df7..65d1b7e 100644 --- a/semantics.h +++ b/semantics.h @@ -14,6 +14,7 @@ typedef struct CDef CDef; typedef CDef *CDef_t; typedef struct CBList *CBList_t; +typedef struct COList *COList_t; struct CVar { char *name; CVar_t next; /* next in the linked list */ @@ -21,6 +22,9 @@ struct CVar { int start; CNode *ast; CBList_t defsite; + /* the following fields are used for renaming */ + int cnt; + COList_t stack; }; CVar_t cvar_create(char *name, CType_t type, CNode *ast); -- cgit v1.2.3