diff options
| -rw-r--r-- | core/parser.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/core/parser.c b/core/parser.c index b4f5696..a438b74 100644 --- a/core/parser.c +++ b/core/parser.c @@ -90,8 +90,6 @@ preprocessor_push(struct tokbuf *tokbuf, struct token *tok) static int parser_nom(struct cescal_state *state, struct token *res) { - struct token tok; - if (state == NULL || res == NULL) { errno = EINVAL; return -1; @@ -99,17 +97,17 @@ parser_nom(struct cescal_state *state, struct token *res) switch (state->pass) { case 0: /* Pre-processor */ - if (lexer_nom(state, &tok) < 0) { + if (lexer_nom(state, res) < 0) { return -1; } - if (preprocessor_push(&state->tokbuf, &tok) < 0) { + if (preprocessor_push(state, &state->tokbuf, res) < 0) { return -1; } break; case 1: /* Parse */ - if (tokbuf_pop(&state->tokbuf, &tok) < 0) { + if (tokbuf_pop(&state->tokbuf, res) < 0) { return -1; } |
