parser: Handle parser scanning on pass 1
Signed-off-by: Ian Moffett <ian@mirocom.org>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user