diff options
author | Michael Forney <mforney@mforney.org> | 2019-02-15 16:38:18 -0800 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-02-15 16:50:24 -0800 |
commit | 8c93eb6681295087da3611f9ee78f5c9f7a9dd37 (patch) | |
tree | 509ae140ee0967e42a1095d9a0a19610384223ee | |
parent | 7fd7a12d75dd874153443d53bb158a501de067aa (diff) |
Use consume in a couple places
-rw-r--r-- | decl.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -471,9 +471,8 @@ declaratortypes(struct scope *s, struct list *result, char **name, bool allowabs *p = mkparam(tok.lit, NULL); p = &(*p)->next; next(); - if (tok.kind != TCOMMA) + if (!consume(TCOMMA)) break; - next(); } while (tok.kind == TIDENT); break; } @@ -483,12 +482,10 @@ declaratortypes(struct scope *s, struct list *result, char **name, bool allowabs for (;;) { *p = parameter(s); p = &(*p)->next; - if (tok.kind != TCOMMA) + if (!consume(TCOMMA)) break; - next(); - if (tok.kind == TELLIPSIS) { + if (consume(TELLIPSIS)) { t->func.isvararg = true; - next(); break; } } |