parser: Handle parser scanning on pass 1

Signed-off-by: Ian Moffett <ian@mirocom.org>
This commit is contained in:
2026-02-15 12:40:55 -05:00
parent 5baa20c892
commit 7f0ba20dd6

View File

@@ -58,6 +58,8 @@ static const char *toktab[] = {
static int
parse_scan(struct rifle_state *state, struct token *tok)
{
struct token *popped;
if (state == NULL || tok == NULL) {
return -1;
}
@@ -68,6 +70,13 @@ parse_scan(struct rifle_state *state, struct token *tok)
return -1;
}
break;
case 1:
if ((popped = tokbuf_pop(&state->tokbuf)) == NULL) {
return -1;
}
*tok = *popped;
break;
}