diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-05-08 16:40:20 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-05-08 16:40:20 -0400 |
commit | 270ce8372aeddaa3f10362f88473ceb1159b9b5f (patch) | |
tree | ddbb7cc772d385bdcfb596722c8c09fff32c664c /tokenizer.c | |
parent | 1fac85b953b4a522e6b03fafa97c25a61e1c62ea (diff) |
#no_warn
Diffstat (limited to 'tokenizer.c')
-rw-r--r-- | tokenizer.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tokenizer.c b/tokenizer.c index d90a4f6..9c48a1a 100644 --- a/tokenizer.c +++ b/tokenizer.c @@ -325,10 +325,14 @@ static Status tokenize_file(Tokenizer *t, File *file) { Directive direct = tokenize_direct(&t->s); if (direct != DIRECT_COUNT) { /* it's a directive */ - tokr_put_end_pos(t, &token); - token.kind = TOKEN_DIRECT; - token.direct = direct; - arr_adda(t->tokens, token, t->allocr); + if (direct == DIRECT_NO_WARN) { + arr_adda(file->no_warn_lines, t->line, t->allocr); + } else { + tokr_put_end_pos(t, &token); + token.kind = TOKEN_DIRECT; + token.direct = direct; + arr_adda(t->tokens, token, t->allocr); + } continue; } --t->s; /* go back to # */ |