diff options
author | Teddy <ted.sybil@gmail.com> | 2014-04-13 12:31:28 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2014-04-13 12:31:28 +0800 |
commit | e8cbc056b7472c2c5438bdbd6571a40d5e1bcfcd (patch) | |
tree | b6128928ede277091f0669ebcada90e7c86cbb40 /semantics.h | |
parent | 47ce7f1266ce1a68551c839fdcfb99c45cdc186e (diff) |
fixed bugs in typedef
Diffstat (limited to 'semantics.h')
-rw-r--r-- | semantics.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/semantics.h b/semantics.h index b836ed2..87cd345 100644 --- a/semantics.h +++ b/semantics.h @@ -155,12 +155,18 @@ unsigned int bkdr_hash(const char *str); const char *ctable_cvar_print(void *var); void semantics_check(CNode *ast); + +enum DefState{ + FORCE_ID, + IN_TYPEDEF, + NONE +}; + int is_identifier(const char *name); void push(const char *name); void cibic_init(void); -void enter_block(void); -void exit_block(void); -void force_id(void); -void enter_typedef(void); -void clear_state(void); +void block_enter(void); +void block_exit(void); +void def_enter(enum DefState kind); +void def_exit(void); #endif |