diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-02-02 22:45:20 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-02-02 22:49:26 -0500 |
commit | 3f660a9b219b03bd5188cd4f0da9a58f507a933a (patch) | |
tree | 57162550b6c390cb0bf1ab143cee5bebda3a6ed8 /dimension/tokenize.c | |
parent | 80555a542f522d70fd0cb98227db005805f0c184 (diff) | |
download | dimension-3f660a9b219b03bd5188cd4f0da9a58f507a933a.tar.xz |
Support #ifdef and #ifndef.
Diffstat (limited to 'dimension/tokenize.c')
-rw-r--r-- | dimension/tokenize.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dimension/tokenize.c b/dimension/tokenize.c index cc912b6..84d5f5d 100644 --- a/dimension/tokenize.c +++ b/dimension/tokenize.c @@ -233,7 +233,7 @@ dmnsn_if_buffer(int token, dmnsn_token_buffer *prev, dmnsn_yyset_extra(cond_buffer->prev, yyscanner); dmnsn_delete_token_buffer(cond_buffer); - dmnsn_token_buffer *tbuffer= dmnsn_new_token_buffer(DMNSN_T_IF, prev); + dmnsn_token_buffer *tbuffer = dmnsn_new_token_buffer(token, prev); dmnsn_astnode *cnode = dmnsn_find_symbol(symtable, "__cond__"); if (!cnode) { @@ -398,6 +398,8 @@ dmnsn_yylex(dmnsn_parse_item *lvalp, dmnsn_parse_location *llocp, } case DMNSN_T_IF: + case DMNSN_T_IFDEF: + case DMNSN_T_IFNDEF: { dmnsn_token_buffer *tb = dmnsn_if_buffer( token, tbuffer, lvalp, llocp, filename, symtable, yyscanner |