diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-02-16 17:01:40 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-02-16 17:01:40 -0800 |
commit | 134b94665d0eebfaa8c6c46058eb76188d42582e (patch) | |
tree | 82444f5f344685badc9341a73edffdf59c0479fb /preproc.c | |
parent | 3f3bd41de017db8e7449f5b1345cd80ab77d2571 (diff) | |
download | nasm-2.02rc2.tar.gz |
Add %ifempty and variantsnasm-2.02rc2
Diffstat (limited to 'preproc.c')
-rw-r--r-- | preproc.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1584,8 +1584,7 @@ static bool if_condition(Token * tline, enum preproc_token ct) goto iftype; iftype: - tline = expand_smacro(tline); - t = tline; + t = tline = expand_smacro(tline); while (tok_type_(t, TOK_WHITESPACE) || (needtype == TOK_NUMBER && @@ -1611,6 +1610,14 @@ static bool if_condition(Token * tline, enum preproc_token ct) } break; + case PPC_IFEMPTY: + t = tline = expand_smacro(tline); + while (tok_type_(t, TOK_WHITESPACE)) + t = t->next; + + j = !t; /* Should be empty */ + break; + case PPC_IF: t = tline = expand_smacro(tline); tptr = &t; |